]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] http: fix handling of message pointers
authorWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 23:15:35 +0000 (00:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 23:15:35 +0000 (00:15 +0100)
commit962c3f4aab6307bd1c0b0b1aa11f8e4e60c94ea0
tree823f0a13f0c8e8bc8c395f8ff91cb4e1bfad92fd
parent59e0b0f97297d6bec936daa5e0683d08da8c64b4
[MEDIUM] http: fix handling of message pointers

Some message pointers were not usable once the message reached the
HTTP_MSG_DONE state. This is the case for ->som which points to the
body because it is needed to parse chunks. There is one case where
we need the beginning of the message : server redirect. We have to
call http_get_path() after the request has been parsed. So we rely
on ->sol without counting on ->som. In order to achieve this, we're
making ->rq.{u,v} relative to the beginning of the message instead
of the buffer. That simplifies the code and makes it cleaner.

Preliminary tests show this is OK.
include/types/proto_http.h
src/backend.c
src/proto_http.c