BUG/MEDIUM: htx: Don't change position of the first block during HTX analysis
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 13 Jun 2019 09:16:45 +0000 (11:16 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 14 Jun 2019 09:13:32 +0000 (11:13 +0200)
commit421e769783ec4a3640a1f74c782e80b1cb1fb0d3
tree45264b5ff97db1d92ddfc994454eac89c4e7ca78
parent8c6548608115bc302356f54dceb7e8d3ab12b247
BUG/MEDIUM: htx: Don't change position of the first block during HTX analysis

In the HTX structure, the field <first> is used to know where to (re)start the
analysis. It may differ from the message's head. It is especially important to
update it to handle 1xx messages, to be sure to restart the analysis on the next
message (another 1xx message or the final one). It is also updated when some
data are forwarded (the headers or part of the body). But this update is an
error and must never be done at the analysis level. It is a bug, because some
sample fetches may be used after the data forwarding (but before the first send
of course). At this stage, if the first block position does not point on the
start-line, most of HTTP sample fetches fail.

So now, when something is forwarding by HTX analyzers, the first block position
is not update anymore.

This issue was reported on Github. See #119. No backport needed.
include/proto/channel.h
src/filters.c
src/proto_htx.c