blob: 0554bb859c69b7a10fde2232771cc8dffafc1b32 [file] [log] [blame]
Willy Tarreau8263b912011-09-05 01:04:44 +020012011/04/20 - List of keep-alive / close options with associated behaviours.
2
3PK="http-pretend-keepalive", HC="httpclose", SC="http-server-close",
Willy Tarreau8263b912011-09-05 01:04:44 +02004
50 = option not set
61 = option is set
7* = option doesn't matter
8
9Options can be split between frontend and backend, so some of them might have
10a meaning only when combined by associating a frontend to a backend. Some forms
11are not the normal ones and provide a behaviour compatible with another normal
Joseph Herlant71b4b152018-11-13 16:55:16 -080012form. Those are considered alternate forms and are marked "(alt)".
Willy Tarreau8263b912011-09-05 01:04:44 +020013
Willy Tarreau6ba69842021-06-11 16:01:50 +020014SC HC PK Behaviour
15 0 0 X tunnel mode
16 0 1 0 passive close, only set headers then tunnel
17 0 1 1 forced close with keep-alive announce (alt)
18 1 0 0 server close
19 1 0 1 server close with keep-alive announce
20 1 1 0 forced close (alt)
21 1 1 1 forced close with keep-alive announce (alt)
Willy Tarreau8263b912011-09-05 01:04:44 +020022
23At this point this results in 4 distinct effective modes for a request being
24processed :
25 - tunnel mode : Connection header is left untouched and body is ignored
26 - passive close : Connection header is changed and body is ignored
27 - server close : Connection header set, body scanned, client-side keep-alive
28 is made possible regardless of server-side capabilities
29 - forced close : Connection header set, body scanned, connection closed.
30
31The "close" modes may be combined with a fake keep-alive announce to the server
32in order to workaround buggy servers that disable chunked encoding and content
33length announces when the client does not ask for keep-alive.
34
35Note: "http-pretend-keepalive" alone has no effect. However, if it is set in a
36 backend while a frontend is in "http-close" mode, then the combination of
37 both will result in a forced close with keep-alive announces for requests
38 passing through both.
39