]> git.kaiwu.me - haproxy.git/commit
MINOR: http/hardening: implement "reject-unexpected-request-payload"
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Nov 2026 16:30:26 +0000 (17:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 25 Nov 2026 18:31:08 +0000 (19:31 +0100)
commitde273dafd7d0f63e209ec9aa927658c49630be3c
tree3acbe7f06851f4deb32e26fefc1b392bda0cf8a7
parentbef12a40c2b4d77e0736ddae44778f7605bb2b84
MINOR: http/hardening: implement "reject-unexpected-request-payload"

Rejects requests which contain a payload on methods which have no
defined semantics with it (HEAD, GET, DELETE, OPTIONS, CONNECT, TRACE),
as well as any HTTP/1.1 request using the chunked Transfer-Encoding.
This protects backend servers having imperfect implementation against a
wide list of attacks that try to abuse their limited parsing to bypass
their inspection or desynchronize them with haproxy. The vast majority
of applications aimed at browsers will not experience any issue with
this setting, but some in-house or proprietary components might rely on
passing a payload to some of these methods, or uploading streamed data
using Transfer-Encoding. Note that other methods are assumed to support
payloads, and unknown methods might be handled similarly to GET by some
servers. As such, when using this to protect an application, it is wise
to also use 'reject-advanced-methods'. This is generally safe for
static web serving and simple internet-facing applications. It is
disabled by default.

http_hardening_report.vtc was updated accordingly since the new flag
appears (0x20000).
doc/configuration.txt
include/haproxy/http-t.h
reg-tests/http-messaging/http_hardening_report.vtc
src/h1_htx.c
src/h2.c
src/h3.c
src/http.c