]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] http: rework request Connection header handling
authorWilly Tarreau <w@1wt.eu>
Mon, 18 Jan 2010 15:54:40 +0000 (16:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 Jan 2010 10:49:35 +0000 (11:49 +0100)
commitbbf0b37f6cfcaf2cde6dd74231d25b69d6824c72
treece4d2ac364b9f4ac9b4ef8e3d69024409a5a6f34
parent348238b3a9a48fd9e7be19cfccae56d1bb44cf46
[MAJOR] http: rework request Connection header handling

We need to improve Connection header handling in the request for it
to support the upcoming keep-alive mode. Now we have two flags which
keep in the session the information about the presence of a
Connection: close and a Connection: keep-alive headers in the initial
request, as well as two others which keep the current state of those
headers so that we don't have to parse them again. Knowing the initial
value is essential to know when the client asked for keep-alive while
we're forcing a close (eg in server-close mode). Also the Connection
request parser is now able to automatically remove single header values
at the same time they are parsed. This provides greater flexibility and
reliability.

All combinations of listen/front/back in all modes and with both
1.0 and 1.1 have been tested.
include/types/proto_http.h
src/proto_http.c