diff options
author | Wynn Wolf Arbor <wolf@oriole.systems> | 2020-06-12 18:07:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 10:07:59 -0600 |
commit | fa4cdde7d8195f2e1ec5c937f00cbf9ce0d6537b (patch) | |
tree | 83e8322839a34071f13a100f91d3e854e86a75af /modules/caddyhttp/push/caddyfile.go | |
parent | d55c3b31ebb77df65cc052dbddc137cbe07b297e (diff) |
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
Diffstat (limited to 'modules/caddyhttp/push/caddyfile.go')
0 files changed, 0 insertions, 0 deletions