httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48273] mod_proxy_fcgi sends broken SCRIPT_FILENAME / PATH_INFO
Date Mon, 07 Mar 2011 17:32:52 GMT

--- Comment #5 from Mark Montague <> 2011-03-07 12:32:49 EST ---

Is SCRIPT_FILENAME part of any standard?  If so, which one?  (I've looked, but
it appears to be specific to Apache HTTP Server).  If the use of
SCRIPT_FILENAME is not specified by any standard, then I'd say that if a
backend chooses to use this variable, it should expect to accommodate the
conventions Apache HTTP Server is following for it in the proxy modules.  I can
see why a backend would choose to use it, as it contains information that
backends likely need which not available in SCRIPT_NAME.  For example, if the
following directive is in effect

ProxyPass /test/ fcgi://

and a request is made for


then mod_proxy_fcgi sends the following to the backend:


SCRIPT_NAME unfortunately can not contain information about the backend's URI
namespace per RFC 3875.

Also, while HTTP is indeed the protocol used between the originator of the
request and the proxy (as indicated by the SERVER_PROTOCOL environment variable
passed to the backend as required by RFC 3875), mod_proxy_fcgi is speaking the
FastCGI protocol to php-fpm, not HTTP, as indicated in the ProxyPass directive
above.  SCRIPT_FILENAME is not reflecting the URL that the user requested from
the proxy, it reflects what the proxy is requesting from the backend (granted,
it does not conform to RFC 1630, but if it did, php-fpm would still not be able
to handle it without modification).

I'm proposing that since I know of no standards that Apache HTTP Server is
violating in its current treatment of SCRIPT_FILENAME, and since this treatment
is standard across the various proxy modules, that php-fpm be modified to strip
out everything up through the port portion of SCRIPT_FILENAME, after which the
existing logic in php-fpm handles everything correctly.

Do you oppose this proposed solution?  If you do, can you explain your reasons
more and/or propose a different solution?  The bug has been open for nearly a
year and a half with no updates, and I'd like to see mod_proxy_fcgi work out of
the box with php-fpm when Apache HTTP Server 2.4 is released at the end of this
month or early next month.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message