]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http: restrict the HTTP version token to 1 digit as per RFC7230
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 11:26:00 +0000 (13:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 12:57:01 +0000 (14:57 +0200)
commit91852eb4280e5fbe63dcd9ea32c168d7516c6667
tree039e753f4e7b2a1d9e53bc922a69a5359e4c68a4
parentb4d0c03aee283e286880f93c4a8c053772a430c8
MEDIUM: http: restrict the HTTP version token to 1 digit as per RFC7230

While RFC2616 used to allow an undeterminate amount of digits for the
major and minor components of the HTTP version, RFC7230 has reduced
that to a single digit for each.

If a server can't properly parse the version string and falls back to 0.9,
it could then send a head-less response whose payload would be taken for
headers, which could confuse downstream agents.

Since there's no more reason for supporting a version scheme that was
never used, let's upgrade to the updated version of the standard. It is
still possible to enforce support for the old behaviour using options
accept-invalid-http-request and accept-invalid-http-response.

It would be wise to backport this to 1.5 as well just in case.
doc/configuration.txt
src/proto_http.c