mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
The buffer's pointer <lr> was only used by HTTP parsers which also use a struct http_msg to keep track of the parser's state. We've reached a point where it makes no sense to keep ->lr in the buffer, as the split between buffer and msg is only arbitrary for historical reasons. This change ensures that touching buffers will not impact HTTP messages anymore, making the buffers more content-agnostic. However, it becomes very important not to forget to update msg->next when some data get forwarded or moved (and in general each time buf->p is updated). The new pointer in http_msg becomes relative to buffer->p so that parsing multiple messages becomes easier. It is possible that at one point ->som and ->next will be merged. Note: http_parse_reqline() and http_parse_stsline() have been temporarily modified to know the message starting point in the buffer (->p).