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 2009/05/12 23:19:57 UTC

DO NOT REPLY [Bug 47186] New: http://www.radioscanningtw.jidanni.org/index.php?title=首頁&uselang=en

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


DO NOT REPLY [Bug 47186] must add [NE] to rewrite_guide.html#canonicalhost example

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


jidanni@jidanni.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://www.radioscanningtw.
                   |                            |jidanni.org/index.php?title
                   |                            |=首頁&uselang=en
            Summary|http://www.radioscanningtw. |must add [NE] to
                   |jidanni.org/index.php?title |rewrite_guide.html#canonica
                   |=首頁&uselang=en              |lhost example




-- 
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 47186] must add [NE] to rewrite_guide.html#canonicalhost example

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


Rich Bowen <rb...@apache.org> changed:

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




--- Comment #2 from Rich Bowen <rb...@apache.org>  2009-05-12 18:36:50 PST ---
Done in r774161: ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=774161: ) although it won't do anything for the query string, it does
indeed prevent URIs from getting double-escaped. 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 47186] must add [NE] to rewrite_guide.html#canonicalhost example

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





--- Comment #1 from Rich Bowen <rb...@apache.org>  2009-05-12 18:33:33 PST ---
That doesn't seem right at all. Surely the query string shouldn't be included
in what RewriteRule matches at all. Adding [NE] certainly won't hurt, but I
don't quite get why it would fix this particular problem.

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