From: Christopher Faulet Date: Wed, 29 Apr 2020 12:20:47 +0000 (+0200) Subject: DOC: Add more info about request formatting in http-check send description X-Git-Tag: v2.2-dev7~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9df910c7f3bda38cf6b1516d37ff5938d14f611a;p=thirdparty%2Fhaproxy.git DOC: Add more info about request formatting in http-check send description Only one Host header can be defined and some headers are automatically skipped (Connection, Content-Length and Transfer-Encoding). In addition, a note about the synchronisation of the Host header value and the request uri has been added. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index df06d85ab4..371fd8a446 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4681,15 +4681,27 @@ http-check send [meth ] [uri ] [ver ] [comment ] In addition to the request line defined by the "option httpchk" directive, this one is the valid way to add some headers and optionally a body to the request sent during HTTP health checks. If a body is defined, the associate - "Content-Length" header is automatically added. The old trick consisting to - add headers after the version string on the "option httpchk" line is now + "Content-Length" header is automatically added. Thus, this header or + "Transfer-encoding" header should not be present in the request provided by + "http-check send". If so, it will be ignored. The old trick consisting to add + headers after the version string on the "option httpchk" line is now deprecated. Note also the "Connection: close" header is still added if a "http-check expect" direcive is defined independently of this directive, just like the state header if the directive "http-check send-state" is defined. Also "http-check send" doesn't support HTTP keep-alive. Keep in mind that it will automatically append a "Connection: close" header, meaning that this - header should not be present in the request provided by "http-check send". + header should not be present in the request provided by "http-check send". If + so, it will be ignored. + + Note that the Host header and the request authority, when both defined, are + automatically synchronized. It means when the HTTP request is sent, when a + Host is inserted in the request, the request authority is accordingly + updated. Thus, don't be surprised if the Host header value overwrites the + configured request authority. + + Note also for now, no Host header is automatically added in HTTP/1.1 or above + requests. You should add it explicitly. See also : "option httpchk", "http-check send-state" and "http-check expect".