httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51517] New: mod_proxy_fcgi is not RFC 3875 compliant
Date Sat, 16 Jul 2011 23:31:52 GMT

             Bug #: 51517
           Summary: mod_proxy_fcgi is not RFC 3875 compliant
           Product: Apache httpd-2
           Version: 2.3.12-beta
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_proxy_fcgi
    Classification: Unclassified


I'm the maintener and developper behind php-fpm. I've been playing with apache
2.3.12 and FPM and I discover that mod_proxy_fcgi is not RFC 3875 compliant.

According to RFC 3875, with the URL
'' the following FASTCGI
variables must be send to the fastcgi server:
- SCRIPT_NAME=/path/to/test.php
- QUERY_STRING=foo=bar
- PATH_INFO=/toto

I've configured mod_proxy_fcgi this way for my tests:

  DocumentRoot /home/fat/web/docs/php
  SetEnvIf Request_URI . proxy-fcgi-pathinfo=1
  ProxyPassMatch ^/(.+\.php.*)$ fcgi://$1

And it sends the following FASTCGI variables:
- SCRIPT_NAME=(empty string)
- QUERY_STRING=foo=bar
- PATH_INFO=/path/to/test.php/toto
- DOCUMENT_ROOT=/home/fat/web/docs/php
- SCRIPT_FILENAME=proxy:fcgi://
- REQUEST_URI=/path/to/test.php/toto?foo=bar

as you see:
- SCRIPT_NAME is not set (it's set to /path/to/test.php/toto if
proxy-fcgi-pathinfo is not set)
- QUERY_STRING is set correctly
- PATH_INFO is not correct as it should be set to '/toto'
- PATH_TRANSLATED is not correct as it should be set to

- DOCUMENT_ROOT is set correctly even if this variable is not defined in the
- REQUEST_URI is set correctly even if this variable is not defined in the RFC
- SCRIPT_FILENAME is set not correctly even if this variable is not defined in
the RFC. It should be set to '/home/fat/web/docs/php/path/to/test.php'.

I didn't really checked other fastcgi variables.

Then, I've made the test with the URL
'' (I removed the /toto
after the script name, which is a more common usage I think). mod_proxy_fcgi
should send:
- SCRIPT_NAME=/path/to/test.php
- QUERY_STRING=foo=bar
- PATH_INFO=(empty string)
(PATH_TRANSLATED must not be send when PATH_INFO is empty)

and it sends with proxy-fcgi-pathinfo:
- SCRIPT_NAME=(empty string)
- QUERY_STRING=foo=bar
- PATH_INFO=/path/to/test.php
- PATH_TRANSLATED=proxy:fcgi://
- SCRIPT_FILENAME=proxy:fcgi://
- DOCUMENT_ROOT=/home/fat/web/docs/php
- REQUEST_URI=/path/to/test.php?foo=bar

or without proxy-fcgi-pathinfo:
- SCRIPT_NAME=/path/to/test.php
- QUERY_STRING=foo=bar
- SCRIPT_FILENAME=proxy:fcgi://
- DOCUMENT_ROOT=/home/fat/web/docs/php
- REQUEST_URI=/path/to/test.php?foo=bar

The problem is still the same:
- proxy-fcgi-pathinfo is buggy (SCRIPT_NAME empty and PATH_INFO/TRANSLATED set
to wrong values)
- SCRIPT_FILENAME is not set correctly (proxy:fcgi:// should be
replace by DOCUMENT_ROOT)

I can make more tests if needed.

I really think mod_proxy_fcgi should be RFC 3875.

Hope it helps
++ jerome

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