summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r--modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
index 9d2dc39..99bf5ec 100644
--- a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
+++ b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
@@ -173,8 +173,8 @@ func (t Transport) buildEnv(r *http.Request) (map[string]string, error) {
splitPos := t.splitPos(fpath)
// Request has the extension; path was split successfully
- docURI := fpath[:splitPos+len(t.SplitPath)]
- pathInfo := fpath[splitPos+len(t.SplitPath):]
+ docURI := fpath[:splitPos]
+ pathInfo := fpath[splitPos:]
scriptName := fpath
// Strip PATH_INFO from SCRIPT_NAME
@@ -292,7 +292,7 @@ func (t Transport) splitPos(path string) int {
lowerPath := strings.ToLower(path)
for _, split := range t.SplitPath {
if idx := strings.Index(lowerPath, strings.ToLower(split)); idx > -1 {
- return idx
+ return idx + len(split)
}
}
return -1