0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/modules/caddyhttp/reverseproxy
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
..
fastcgi fastcgi: Make sure splitPos handles empty SplitPath correctly (#3491) 2020-06-12 10:07:59 -06:00
caddyfile.go reverseproxy: Add Caddyfile support for ClientCertificateAutomate 2020-06-08 10:30:26 -06:00
command.go cmd: hash-password: Fix broken terminal state on SIGINT (#3416) 2020-05-21 13:09:49 -06:00
healthchecks.go reverseproxy: Fix https active health checks #3450 (#3451) 2020-05-26 12:40:57 -06:00
hosts.go core: Rename ParsedAddress -> NetworkAddress 2020-04-07 08:33:45 -06:00
httptransport.go pki: Embedded ACME server (#3198) 2020-05-05 12:35:32 -06:00
reverseproxy.go reverseproxy: Enable changing only the status code (close #2920) 2020-06-04 12:06:38 -06:00
selectionpolicies.go core: Rename ParsedAddress -> NetworkAddress 2020-04-07 08:33:45 -06:00
selectionpolicies_test.go Migrate some selection policy tests over to v2 2019-09-09 21:44:58 -06:00
streaming.go reverseproxy: Close websocket conn if req context cancels 2020-06-11 15:25:26 -06:00