I'm writing some code that parses HTTP requests and responses, but it may not see both sides of every conversation.
The HTTP RFC states that a HEAD
request should cause exactly the same response as GET
except that a message body is not sent. This seems to imply that a Content-Length
header would be included.
If HTTP Pipelining is being used, I cannot see how you would reliably parse a pipelined response to a HEAD
without having seen the request; the headers would not correctly indicate the length of the response, there is no Transfer-Encoding
, and the connection would not necessarily be closed at the end.
Any ideas? Can anyone see any other types of response that cannot be parsed without seeing the request?