]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http: remove stupid HTTP_METH_NONE entry
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Sep 2015 15:15:21 +0000 (17:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Sep 2015 15:15:21 +0000 (17:15 +0200)
commitb7ce424be2bc9df73a3b971fa9dd6daea0332bf1
treefdffc7d9d110d7fa79c7877b173cfe019e3c5e9d
parent42148735bc04c298d756b7d0be0ae67eac8e9286
BUG/MINOR: http: remove stupid HTTP_METH_NONE entry

When converting the "method" fetch to a string, we used to get an empty
string if the first character was not an upper case. This was caused by
the lookup function which returns HTTP_METH_NONE when a lookup is not
possible, and this method being mapped to an empty string in the array.

This is a totally stupid mechanism, there's no reason for having the
result depend on the first char. In fact the message parser already
checks that the syntax matches an HTTP token so we can only land there
with a valid token, hence only HTTP_METH_OTHER should be returned.

This fix should be backported to all actively supported branches.
include/types/sample.h
src/proto_http.c