mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-20 22:52:58 -05:00
fastcgi: Account for lack of split path configuration (fix #3221)
This commit is contained in:
parent
b6482e53c1
commit
1e8af27329
1 changed files with 8 additions and 8 deletions
|
@ -181,14 +181,14 @@ func (t Transport) buildEnv(r *http.Request) (map[string]string, error) {
|
||||||
|
|
||||||
fpath := r.URL.Path
|
fpath := r.URL.Path
|
||||||
|
|
||||||
// Split path in preparation for env variables.
|
// split "actual path" from "path info" if configured
|
||||||
// Previous canSplit checks ensure this can never be -1.
|
var docURI, pathInfo string
|
||||||
// TODO: I haven't brought over canSplit from v1; make sure this doesn't break
|
if splitPos := t.splitPos(fpath); splitPos > -1 {
|
||||||
splitPos := t.splitPos(fpath)
|
docURI = fpath[:splitPos]
|
||||||
|
pathInfo = fpath[splitPos:]
|
||||||
// Request has the extension; path was split successfully
|
} else {
|
||||||
docURI := fpath[:splitPos]
|
docURI = fpath
|
||||||
pathInfo := fpath[splitPos:]
|
}
|
||||||
scriptName := fpath
|
scriptName := fpath
|
||||||
|
|
||||||
// Strip PATH_INFO from SCRIPT_NAME
|
// Strip PATH_INFO from SCRIPT_NAME
|
||||||
|
|
Loading…
Add table
Reference in a new issue