Solved: pasting the bytes here made me realise that I was missing empty lines between chunks...
Does an HTTP/1.1 request need to specify a Connection: keep-alive
header, or is it always keep-alive by default?
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.
I ask since my the different client behaviour of ab
and httperf
is driving me mad enough to wonder my sanity on this one...
Here's what httperf --hog --port 42042 --print-reply body
sends:
GET / HTTP/1.1
User-Agent: httperf/0.9.0
Host: localhost
And here's my server's response:
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.
Where's my bug?