]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] http: make the analyser not rely on msg being initialized anymore
authorWilly Tarreau <w@1wt.eu>
Sat, 2 Jan 2010 20:59:16 +0000 (21:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 2 Jan 2010 20:59:16 +0000 (21:59 +0100)
commit15de77e16e6569a82089046328a1178e2c5ce75d
tree4fcadebbbf00f3c0e24d1471e720ff033c6eab33
parent0b9da8dd45dfec7cad5dcea56323e60efb631fd7
[MEDIUM] http: make the analyser not rely on msg being initialized anymore

The HTTP parser needed the msg structure to hold pre-initialized pointers.
This causes a trouble with keep-alive because if some data is still in the
buffer, the pointers can be anywhere after the data and later become invalid
when the buffer gets realigned.

It was not needed to rely on that since we have two valid information
in the buffer itself :

  - buf->lr : last visited place
  - buf->w + buf->send_max : beginning of next message

So by doing the maths only on those values, we can avoid doing tricks
on msg->som.
src/proto_http.c