DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27985

mod_rewrite adds a per-dir-prefix to proxy requests, all requests now return 
error 400

           Summary: mod_rewrite adds a per-dir-prefix to proxy requests, all
                    requests now return error 400
           Product: Apache httpd-2.0
           Version: 2.0.49
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: mod_rewrite
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


When using Apache 2.0.49 mod_rewrite with rewrite-maps on proxied requests,
apache applies a false per-dir prefix and garbles the url.

Apache 2.0.48 was working as expected.


I have the following statements in my httpd.conf (simplified):

RewriteMap      proxy-map       prg:/usr/local/bin/proxy-map
RewriteMap      local-map       prg:/usr/local/bin/proxy-local-map

<Proxy *>
        RewriteEngine On
        RewriteCond %{SERVER_ADDR} ^127\.0\.0
        RewriteRule ^proxy:http://id/$ http://localhost/cgi-bin/id [R,L]
        RewriteRule ^(.*)$ ${proxy-map:$1|$1}
        RewriteCond %{SERVER_ADDR} ^127\.0\.0
        RewriteRule ^(.*)$ ${local-map:$1|$1}
</Proxy>

The output of RewriteLog on Level 9:

(3) [per-dir */] applying pattern '^proxy:http://id/$' to uri
'proxy:http://www.apache.org/'
(3) [per-dir */] applying pattern '^(.*)$' to uri 'proxy:http://www.apache.org/'
(5) map lookup OK: map=proxy-map key=proxy:http://www.apache.org/ ->
val=proxy:http://www.apache.org/
(2) [per-dir */] rewrite proxy:http://www.apache.org/ ->
proxy:http://www.apache.org/
(3) [per-dir */] add per-dir prefix: proxy:http://www.apache.org/ ->
*/proxy:http://www.apache.org/
(3) [per-dir */] strip per-dir prefix: */proxy:http://www.apache.org/ ->
proxy:http://www.apache.org/
(3) [per-dir */] applying pattern '^(.*)$' to uri 'proxy:http://www.apache.org/'
(4) RewriteCond: input='127.0.0.1' pattern='^127\.0\.0' => matched
(5) map lookup OK: map=local-map key=proxy:http://www.apache.org/ ->
val=proxy:http://www.apache.org/
(2) [per-dir */] rewrite proxy:http://www.apache.org/ ->
proxy:http://www.apache.org/
(3) [per-dir */] add per-dir prefix: proxy:http://www.apache.org/ ->
*/proxy:http://www.apache.org/

Nothing in the error-log, and only the following in the access-log:

127.0.0.1 - - [26/Mar/2004:15:02:58 +0100] "GET http://www.apache.org/ HTTP/1.1"
400 - "-" "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040312" 0 "-"

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to