]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-fetch: Use integer value when possible in "method" sample fetch
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Jun 2022 15:16:41 +0000 (17:16 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Jun 2022 15:50:54 +0000 (17:50 +0200)
commitdbbdb25f1c0a96094c4e357105264053644d9255
tree37e484d6d997d41bb1c96019a8a0ee24128c19eb
parent5eb67f5d7400fce75cf429d09af31464ed0eabfc
BUG/MINOR: http-fetch: Use integer value when possible in "method" sample fetch

Because of the previous fix, if the HTTP parsing is performed when the
"method" sample fetch is called, we always rely on the string representation
of the request method.

Indeed, if no parsing was performed when the "method" sample fetch is
called, the transaction method is HTTP_METH_OTHER because it was just
initialized. However, without this patch, in this case, we always retrieve
the method by reading the request start-line.

Now, when the method is HTTP_METH_OTHER, we systematically try to parse the
request but the method is tested once again after the parsing to be able to
use the integer representation when possible.

This patch must be backported as far as 2.0.
src/http_fetch.c