HTTP HEAD method and pipelining

I am writing code that analyzes HTTP requests and responses, but may not see both sides of each conversation.

The HTTP RFC claims that the HEAD request must cause the exact same response as the GET , except that the message body is not sent. This means that the Content-Length header will be included.

If HTTP Pipelining is used, I don’t see how you reliably analyzed the pipelined response to HEAD without seeing the request; headers will not correctly indicate the length of the response, there is no Transfer-Encoding , and the connection will not necessarily be closed at the end.

Any ideas? Can anyone see any other types of responses that cannot be analyzed without looking at the request?

+4
source share
1 answer

I agree. It is impossible to know that the response to the request does not have an entity body, although the ContentLength header seems to imply the opposite. For this reason, all implementations must consider the request method.

+3
source

Source: https://habr.com/ru/post/1303620/


All Articles