]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h1: Reject HTTP/1.0 GET/HEAD/DELETE requests with a payload
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 21 Sep 2021 16:44:55 +0000 (18:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Sep 2021 14:21:11 +0000 (16:21 +0200)
commite136bd12a32970bc90d862d5fe09ea1952b62974
tree0fcac2e472d9055e1ad776676fc9f1ec41a06159
parentb3230f76e8540825aa003a58424aadc049b9ae51
MEDIUM: mux-h1: Reject HTTP/1.0 GET/HEAD/DELETE requests with a payload

This kind of requests is now forbidden and rejected with a
413-Payload-Too-Large error.

It is unexpected to have a payload for GET/HEAD/DELETE requests. It is
explicitly allowed in HTTP/1.1 even if some servers may reject such
requests. However, HTTP/1.0 is not clear on this point and some old servers
don't expect any payload and never look for body length (via Content-Length
or Transfer-Encoding headers).

It means that some intermediaries may properly handle the payload for
HTTP/1.0 GET/HEAD/DELETE requests, while some others may totally ignore
it. That may lead to security issues because a request smuggling attack is
possible.

To prevent any issue, those requests are now rejected.

See also httpwg/http-core#904
src/mux_h1.c