]> git.kaiwu.me - haproxy.git/commit
MEDIUM: http: small helpers to compute how far to rewind to find BODY and DATA
authorWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2014 18:31:44 +0000 (20:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Apr 2014 21:15:28 +0000 (23:15 +0200)
commit0d09050aa5ee80305888ed1b88f8b619582edd45
treeeb8640cdcfe75699e3de7b14ea9e729529b3c139
parentda6eed621fd69fd860d879e1609da1cc07ea23e6
MEDIUM: http: small helpers to compute how far to rewind to find BODY and DATA

http_body_rewind() returns the number of bytes to rewind before buf->p to
find the message's body. It relies on http_hdr_rewind() to find the beginning
and adds msg->eoh + msg->eol which are always safe.

http_data_rewind() does the same to get the beginning of the data, which
differs from above when a chunk is present. It uses the function above and
adds msg->sol.

The purpose is to centralize further ->sov changes aiming at avoiding
to rely on buf->o.
include/proto/proto_http.h
src/backend.c