]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http: headers must be forwarded even if data was already inspected
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Apr 2014 12:29:58 +0000 (14:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Apr 2014 21:15:28 +0000 (23:15 +0200)
commitb59c7bfc95ecd0a75c4a35dcfb7fba1ac587e89c
tree1a44e3164410d39bfb4cfee80c20782e3cceb4f8
parent6fef8ae0478c201a1dce555963f0838635b02e6b
MEDIUM: http: headers must be forwarded even if data was already inspected

Currently, we forward headers only if the incoming message is still before
HTTP_MSG_CHUNK_SIZE, otherwise they'll be considered as data. In practice
this is always true for the response since there's no data inspection, and
for the request there is no compression so there's no problem with forwarding
them as data.

But the principle is incorrect and will make it difficult to later add data
processing features. So better fix it now.

The new principle is simple :
  - if headers were not yet forwarded, forward them now.
  - while doing so, check if we need to update the state
src/proto_http.c