]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: Add OPTIONS in supported http methods (found by find_http_meth)
authorChristopher Faulet <cfaulet@qualys.com>
Fri, 31 Jul 2015 12:26:57 +0000 (14:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2015 08:18:09 +0000 (10:18 +0200)
The 'OPTIONS' method was not in the list of supported HTTP methods and
find_http_meth return HTTP_METH_OTHER instead of HTTP_METH_OPTIONS.

[wt: this fix needs to be backported at least to 1.5, 1.4 and 1.3]

src/proto_http.c

index 6d4a6b3674450085b996b980709505959e214496..32b9063a99706ca06078b3e05fc938d510ef2459 100644 (file)
@@ -458,6 +458,9 @@ const struct http_method_desc http_methods[26][3] = {
        ['H' - 'A'] = {
                [0] = { .meth = HTTP_METH_HEAD    , .len=4, .text="HEAD"    },
        },
+       ['O' - 'A'] = {
+               [0] = { .meth = HTTP_METH_OPTIONS , .len=7, .text="OPTIONS" },
+       },
        ['P' - 'A'] = {
                [0] = { .meth = HTTP_METH_POST    , .len=4, .text="POST"    },
                [1] = { .meth = HTTP_METH_PUT     , .len=3, .text="PUT"     },