You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/12/21 19:32:48 UTC

DO NOT REPLY [Bug 46428] New: Spaces in URI doesn't encode in proxy-requests

https://issues.apache.org/bugzilla/show_bug.cgi?id=46428

           Summary: Spaces in URI doesn't encode in proxy-requests
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: renton@1gb.ru


Proxy request:

On server1 -
# cat .htaccess
RewriteEngine On
RewriteRule (AAA.*) http://server2.com/phpinfo.php?q=$1 [L,P]

# telnet server1.com 80
GET /AAA%20AAA HTTP/1.1
HOST:server1.com

answer from server2:
QUERY_STRING    q=AAA
REQUEST_URI     /phpinfo.php?q=AAA
SCRIPT_NAME     /phpinfo.php

Usual requst:
# cat .htaccess
RewriteEngine On
RewriteRule (AAA.*) /phpinfo.php?q=$1 [L]

Similar request but the answer is:
QUERY_STRING    q=AAA AAA
REQUEST_URI     /AAA%20AAA
SCRIPT_NAME     /phpinfo.php


-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46428] Spaces in URI doesn't encode in proxy-requests

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46428


Joe Orton <jo...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Joe Orton <jo...@redhat.com>  2009-03-23 09:03:53 PST ---
Fixed in r757427 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=757427 )- thanks for the report.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46428] Spaces in URI doesn't encode in proxy-requests

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46428





--- Comment #2 from Ruediger Pluem <rp...@apache.org>  2009-05-10 08:13:57 PST ---
Backported to 2.2.x as r773351 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=773351 )

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 46428] Spaces in URI doesn't encode in proxy-requests

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46428

Alexey Vlasov <re...@1gb.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #3 from Alexey Vlasov <re...@1gb.ru> ---
By the way this patch didn't solve that problem I described first. You should
add the following:

--- modules/mappers/mod_rewrite.c.orig  2012-09-18 22:30:31.170185072 +0400
+++ modules/mappers/mod_rewrite.c       2012-09-17 23:48:43.428422154 +0400
@@ -769,6 +769,7 @@
         else if (r->args[len-1] == '&') {
             r->args[len-1] = '\0';
         }
+        r->args = ap_escape_uri(r->pool, r->args);
         rewritelog((r, 3, NULL, "split uri=%s -> uri=%s, args=%s", olduri,
                     r->filename, r->args ? r->args : "<none>"));
     }

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org