Created
June 10, 2014 17:27
-
-
Save ptarjan/d874ce601501ba7ea0ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hphp/runtime/server/fastcgi/fastcgi-transport.cpp b/hphp/runtime/server/fastcgi/fastcgi-transport.cpp | |
index 6372f1e..fbe71d6 100644 | |
--- a/hphp/runtime/server/fastcgi/fastcgi-transport.cpp | |
+++ b/hphp/runtime/server/fastcgi/fastcgi-transport.cpp | |
@@ -449,7 +449,7 @@ void FastCGITransport::onHeadersComplete() { | |
m_scriptFilename = getRawHeader(s_pathTranslated); | |
} | |
- // do a check for mod_proxy_cgi and remove the start portion of the string | |
+ // do a check for mod_proxy_fcgi and remove the start portion of the string | |
const std::string modProxy = "proxy:fcgi://"; | |
if (m_scriptFilename.find(modProxy) == 0) { | |
m_scriptFilename = m_scriptFilename.substr(modProxy.length()); | |
@@ -458,6 +458,11 @@ void FastCGITransport::onHeadersComplete() { | |
if (slashPos != String::npos) { | |
m_scriptFilename = m_scriptFilename.substr(slashPos); | |
} | |
+ // remove everything after the first ? | |
+ int questionPos = m_scriptFilename.find('?'); | |
+ if (questionPos != String::npos) { | |
+ m_scriptFilename = m_scriptFilename.substr(0, questionPos); | |
+ } | |
} | |
// RequestURI needs script_filename and path_translated to not include |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment