[Zope3-checkins] CVS: Zope3/src/zope/publisher - http.py:1.52

Dmitry Vasiliev dima at hlabs.spb.ru
Tue Apr 13 05:57:08 EDT 2004


Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv777/src/zope/publisher

Modified Files:
	http.py 
Log Message:
URL parts should be encoded to utf-8 before quoting.


=== Zope3/src/zope/publisher/http.py 1.51 => 1.52 ===
--- Zope3/src/zope/publisher/http.py:1.51	Wed Apr  7 10:36:47 2004
+++ Zope3/src/zope/publisher/http.py	Tue Apr 13 05:57:04 2004
@@ -485,7 +485,8 @@
             if level > len(names):
                 raise IndexError, level
             names = names[:-level]
-        names = [quote(name, safe='/+@') for name in names]
+        # See: http://www.ietf.org/rfc/rfc2718.txt, Section 2.2.5
+        names = [quote(name.encode("utf-8"), safe='/+@') for name in names]
 
         if path_only:
             if not names:
@@ -506,7 +507,8 @@
         else:
             names = self._app_names
 
-        names =  [quote(name, safe='/+@') for name in names]
+        # See: http://www.ietf.org/rfc/rfc2718.txt, Section 2.2.5
+        names =  [quote(name.encode("utf-8"), safe='/+@') for name in names]
 
         if path_only:
             return names and ('/' + '/'.join(names)) or '/'




More information about the Zope3-Checkins mailing list