httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47664] New: ap_proxy_canonenc: does not recode all high-byte chars back into %HH form
Date Fri, 07 Aug 2009 20:29:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47664

           Summary: ap_proxy_canonenc: does not recode all high-byte chars
                    back into %HH form
           Product: Apache httpd-2
           Version: 2.2.12
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: marco.walther@sun.com


--- Comment #0 from Marco Walther <marco.walther@sun.com> 2009-08-07 13:29:19 PDT ---
I have a URL with an utf-8 encoded `รณ' in it. mod_proxy mangles that when
`nocanon' is not set.

The problem is that one byte is translated back into the %HH form but the othe
one is not:-(

Some pieces of errorlog: (I added some log entries not in the normal source;-)
---------------------------------------------------------------
mod_proxy_balancer.c(46): proxy: BALANCER: canonicalising URL
//cluster_foo/projects/mw-test/pages/\xc3\xb3/edit
mod_proxy_balancer.c(71): proxy: BALANCER: mw canonicalised URL
projects/mw-test/pages/\xc3%B3/edit (len 32)
mod_proxy_balancer.c(82): proxy: BALANCER: mw canonicalised filename
proxy:balancer://cluster_foo/projects/mw-test/pages/\xc3%B3/edit (len 63)
mod_proxy_balancer.c(1152): proxy: Entering bybusyness for BALANCER
(balancer://cluster_foo)
mod_proxy_balancer.c(1211): proxy: bybusyness selected worker "http://be:8280"
: busy 0 : lbstatus -1
mod_proxy_balancer.c(581): proxy: BALANCER (balancer://cluster_foo) worker
(http
://be:8280) rewritten to http://be:8280/projects/mw-test/pages/\xc3%B3/edit
mod_proxy.c(993): Running scheme balancer handler (attempt 0)
mod_proxy_http.c(1920): proxy: HTTP: serving URL
http://be:8280/projects/mw-test/pages/\xc3%B3/edit
proxy_util.c(1991): proxy: HTTP: has acquired connection for (be)
proxy_util.c(2047): proxy: connecting
http://be:8280/projects/mw-test/pages/\xc3%B3/edit to be:8280
proxy_util.c(2145): proxy: connected /projects/mw-test/pages/\xc3%B3/edit to
be:8280
-----------------------------------------------------

The problem seems to be in proxy_util.c - ap_proxy_canonenc, some (?) char's
are not recoded.

I changed the source a bit and now it seems to work better: The diff is for
2.2.11 but that area did not change in 2.2.12!!

--- httpd-2.2.11-orig/modules/proxy/proxy_util.c     Tue Nov 11 12:04:34 2008
+++ httpd-2.2.11-work/modules/proxy/proxy_util.c     Fri Aug  7 12:38:20 2009
@@ -213,7 +213,7 @@
             }
         }
 /* recode it, if necessary */
-        if (!apr_isalnum(ch) && !strchr(allowed, ch)) {
+        if (!(apr_isascii(ch) && apr_isalnum(ch)) && !strchr(allowed, ch))
{
             ap_proxy_c2hex(ch, &y[j]);
             j += 2;
         }

-- 
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


Mime
View raw message