BUG/MINOR: mux-fcgi: Correctly set pathinfo

Existing logic for checking whether a regex subexpression for pathinfo
is matched results in valid matches being ignored and non-matches having
a new zero length string stored in params->pathinfo. This patch reverses
the logic so params->pathinfo is set when the subexpression is matched.

Without this patch the example configuration in the documentation:

	path-info ^(/.+\.php)(/.*)?$

does not result in PATH_INFO being sent to the FastCGI application, as
expected, when the second subexpression is matched (in which case both
pmatch[2].rm_so and pmatch[2].rm_eo will be non-negative integers).

This patch may be backported as far as 2.2, the first release that made
the capture of this second subexpression optional.

(cherry picked from commit 26a9ac5f2f34ff9fd030004a490add53fc6db766)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 6e44c2220b6ea0dbf2a92bd7dfa062ed96d116d8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 13504889163f376e0001591cb415c5773f870034)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 49b7e01e626587c2116a84485a61674a202d7fe9)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed