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 47186] New: http://www.radioscanningtw.jidanni.org/index.php?title=首頁&uselang=en
Date Tue, 12 May 2009 21:19:57 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47186

           Summary: http://www.radioscanningtw.jidanni.org/index.php?title
                    =首頁&uselang=en
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: jidanni@jidanni.org


http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html#canonicalhost
needs to be corrected as follows, or else it will fail outside of ASCII.
-RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
+RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R,NE]
Otherwise the QUERY_STRING will get doubly escaped!:
$ set
radioscanningtw.jidanni.org/index.php?title=%E9%A6%96%E9%A0%81\&uselang=en
$ w3m -dump http://$1|head
Jump to: navigation, search...
$ w3m -dump http://www.$1|head
The requested page title was invalid, empty, or an incorrectly linked...
$ HEAD -PS http://$1|head -n 2
HEAD
http://radioscanningtw.jidanni.org/index.php?title=%E9%A6%96%E9%A0%81&uselang=en
--> 200 OK
$ HEAD -PS http://www.$1|head -n 2
HEAD
http://www.radioscanningtw.jidanni.org/index.php?title=%E9%A6%96%E9%A0%81&uselang=en
--> 301 Moved Permanently
HEAD
http://radioscanningtw.jidanni.org/index.php?title=%25E9%25A6%2596%25E9%25A0%2581&uselang=en
--> 200 OK
(I will tell the MediaWiki people to return 404.)

The preceding is the situation on Dreamhost when one clicks their
"rewrite my URL without WWW" option on their control panel, and not the
product of junior programmer me. It also probably affects those who
chose their "Always add WWW" option.

So any of their hundreds of thousands of users are affected, the moment
any non ASCII is attempted... all presumably due to poor advice there in
the Apache manual, perhaps.

And the problem was not detected earlier because most of their users are
USA ASCII website making people, perhaps.

I will tell Dreamhost to have a look at this bug report.

However I would also like to note that on my home machine, I needed to change
-RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R,NE]
+RewriteRule   (.*) http://fully.qualified.domain.name/$1 [L,R,NE]
during my experiments too.

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