https://issues.apache.org/bugzilla/show_bug.cgi?id=51077
Summary: mod_rewrite does not pass query string to
mod_proxy_fcgi and mod_proxy_scgi
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
mod_rewrite does not pass the query string to the back-end server when the
[P] flag is used with mod_proxy_fcgi or mod_proxy_scgi.
To reproduce the problem, add the following directives to the virtual host
context and restart httpd:
ProxyPass /fcgi-test-proxypass/ fcgi://127.0.0.1:4000/
ProxyPass /scgi-test-proxypass/ scgi://127.0.0.1:4001/
RewriteRule ^/(fcgi-test-rewrite/.*)$ fcgi://127.0.0.1:4000/$1 [P]
RewriteRule ^/(scgi-test-rewrite/.*)$ scgi://127.0.0.1:4001/$1 [P]
Then start each of the two perl scripts attached to this issue; each
one is a simple server (FastCGI and SCGI, respectively) that do nothing
but echo back the request environment variables to the client:
# ./fcgi-test-server.pl &
# ./scgi-test-server.pl &
The query string is handled properly when the ProxyPass directive is used:
$ curl -s http://127.0.0.1/fcgi-test-proxypass/some/script.php?q=hello | \
grep QUERY_STRING
QUERY_STRING="q=hello"
$ curl -s http://127.0.0.1/scgi-test-proxypass/some/script.php?q=hello | \
grep QUERY_STRING
QUERY_STRING="q=hello"
$
However, the query string is not passed to the back-end server when
mod_rewrite is used. (mod_proxy_fcgi sets the query string to an empty
value, while mod_proxy_scgi does not set it at all.)
$ curl -s http://127.0.0.1/fcgi-test-rewrite/some/script.php?q=hello | \
grep QUERY_STRING
QUERY_STRING=""
$ curl -s http://127.0.0.1/scgi-test-rewrite/some/script.php?q=hello | \
grep QUERY_STRING
$
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]