mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-01 11:01:46 +00:00
0558a02eb1
One of the issues we face when we need to either forward headers only before compressing, or rewind the stream during a redispatch is to know the proper length of the request headers. msg->eoh always has the total length up to the last CRLF, and we never know whether the request ended with a single LF or a standard CRLF. This makes it hard to rewind the headers without explicitly checking the bytes in the buffer. Instead of doing so, we now use msg->eol to carry the length of the last CRLF (either 1 or 2). Since it is not modified at all after HTTP_MSG_BODY, and was only left in an undefined state, it is safe to use at any moment. Thus, the complete header length to forward or to rewind now is always msg->eoh + msg->eol. |
||
---|---|---|
.. | ||
common | ||
import | ||
proto | ||
types |