sukut bo'yicha HTTP/1.1 talabi bevosita saqlanib qoladimi?

Solved: pasting the bytes here made me realise that I was missing empty lines between chunks...


Bir HTTP/1.1 so'rovida Connection: keep-alive sarlavhasini ko'rsatish kerakmi yoki uni doimo sukut saqlayaptimi?

This guide made me think it would; that, when my http server gets a 1.1 request, it is keep-alive unless explicitly receiving a Connection: close header.

ab va httperf turli xil mijozlar xatti-harakatlari meni aql-idrokka jalb qilish uchun etarlicha aqldan ozdiradi.


httperf --hog --port 42042 - bosma-javob tanasi yuboradi:

GET/HTTP/1.1
User-Agent: httperf/0.9.0
Host: localhost

Va mening serverimning javobim shu:

HTTP/1.1 200 OK
Connection: keep-alive
Transfer-Encoding: chunked
Content-Length: 18

12
Hello World      1
0

httpref promptly prints out the response, but then just sits there, neither side closing the connection and httpref not exiting.

Xato qayerda?

13
kodlangan kodlashdagi kontent uzunligi juda mantiqiy emas
qo'shib qo'ydi muallif nurettin, manba
Ha, saqlansin HTTP/1.1 standarti.
qo'shib qo'ydi muallif Benjie, manba

1 javoblar

QRM 2616, qism 8.1.2 dan:

HTTP/1.1 va HTTP oldingi versiyalari orasida sezilarli farq, doimiy ulanishlar HTTP ulanishining odatiy harakati hisoblanadi. Ya'ni, agar boshqacha ko'rsatilmagan bo'lsa, mijoz serverdan xato javoblardan so'ng ham server doimiy aloqani saqlay olishi kerak deb hisoblashi kerak.

19
qo'shib qo'ydi