Commit aa5a5957 authored by Mathias Beke's avatar Mathias Beke

middleware/fastcgi: Stripping PATH_INFO from SCRIPT_NAME

parent 9dfb940d
......@@ -166,6 +166,12 @@ func (h Handler) buildEnv(r *http.Request, rule Rule, fpath string) (map[string]
scriptFilename = absPath
}
// Strip PATH_INFO from SCRIPT_NAME
indexPathInfo := strings.LastIndex(scriptName, pathInfo)
if indexPathInfo != -1 {
scriptName = scriptName[:indexPathInfo]
}
// Some variables are unused but cleared explicitly to prevent
// the parent environment from interfering.
env = map[string]string{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment