caddy/modules/caddyhttp/reverseproxy/fastcgi
Wynn Wolf Arbor fa4cdde7d8
fastcgi: Make sure splitPos handles empty SplitPath correctly (#3491)
In commit f2ce81c, support for multiple path splitters was added. The
type of SplitPath changed from string to []string, and splitPos was
changed to loop through all values in SplitPath.

Before that commit, if SplitPath was empty, strings.Index returned 0 and
PATH_INFO was set correctly in buildEnv.

Currently, however, splitPos returns -1 for empty values of SplitPath,
behaving as if a split position could not be found at all. PATH_INFO is
then never set in buildEnv and remains empty.

Restore the old behaviour by explicitly checking whether SplitPath is
empty and returning 0 in splitPos.

Closes #3490
2020-06-12 10:07:59 -06:00
..
caddyfile.go fastcgi: php_fastcgi subdirectives to override shortcut behaviour (#3255) 2020-05-18 12:15:38 -06:00
client.go reverse_proxy: WIP refactor and support for FastCGI 2019-09-02 22:01:02 -06:00
client_test.go reverse_proxy: WIP refactor and support for FastCGI 2019-09-02 22:01:02 -06:00
fastcgi.go fastcgi: Make sure splitPos handles empty SplitPath correctly (#3491) 2020-06-12 10:07:59 -06:00