We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a294ac commit b632a5eCopy full SHA for b632a5e
1 file changed
cgi.go
@@ -213,7 +213,8 @@ func splitCgiPath(fc *frankenPHPContext) {
213
// If a worker is already assigned explicitly, derive SCRIPT_NAME from its filename
214
if fc.worker != nil {
215
fc.scriptFilename = fc.worker.fileName
216
- if strings.HasPrefix(fc.worker.fileName, fc.documentRoot) {
+ docRootWithSep := fc.documentRoot + string(filepath.Separator)
217
+ if strings.HasPrefix(fc.worker.fileName, docRootWithSep) {
218
fc.scriptName = filepath.ToSlash(strings.TrimPrefix(fc.worker.fileName, fc.documentRoot))
219
} else {
220
fc.pathInfo = ""
0 commit comments