[Python-checkins] r87566 - in python/branches/release27-maint: Lib/test/test_wsgiref.py Lib/wsgiref/util.py Misc/NEWS

senthil.kumaran python-checkins at python.org
Wed Dec 29 07:30:19 CET 2010


Author: senthil.kumaran
Date: Wed Dec 29 07:30:19 2010
New Revision: 87566
Log:
Merged revisions 87564 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
 r87564 | senthil.kumaran | 2010年12月29日 14:25:42 +0800 (2010年12月29日) | 3 lines
 
 Fix Issue 10753 - Don't quote ;=, in the PATH_INFO envvar.
........
Modified:
 python/branches/release27-maint/ (props changed)
 python/branches/release27-maint/Lib/test/test_wsgiref.py
 python/branches/release27-maint/Lib/wsgiref/util.py
 python/branches/release27-maint/Misc/NEWS
Modified: python/branches/release27-maint/Lib/test/test_wsgiref.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_wsgiref.py	(original)
+++ python/branches/release27-maint/Lib/test/test_wsgiref.py	Wed Dec 29 07:30:19 2010
@@ -306,6 +306,10 @@
 self.checkReqURI("http://127.0.0.1/spam", SCRIPT_NAME="/spam")
 self.checkReqURI("http://127.0.0.1/spammity/spam",
 SCRIPT_NAME="/spammity", PATH_INFO="/spam")
+ self.checkReqURI("http://127.0.0.1/spammity/spam;ham",
+ SCRIPT_NAME="/spammity", PATH_INFO="/spam;ham")
+ self.checkReqURI("http://127.0.0.1/spammity/spam;cookie=1234,5678",
+ SCRIPT_NAME="/spammity", PATH_INFO="/spam;cookie=1234,5678")
 self.checkReqURI("http://127.0.0.1/spammity/spam?say=ni",
 SCRIPT_NAME="/spammity", PATH_INFO="/spam",QUERY_STRING="say=ni")
 self.checkReqURI("http://127.0.0.1/spammity/spam", 0,
Modified: python/branches/release27-maint/Lib/wsgiref/util.py
==============================================================================
--- python/branches/release27-maint/Lib/wsgiref/util.py	(original)
+++ python/branches/release27-maint/Lib/wsgiref/util.py	Wed Dec 29 07:30:19 2010
@@ -64,7 +64,7 @@
 """Return the full request URI, optionally including the query string"""
 url = application_uri(environ)
 from urllib import quote
- path_info = quote(environ.get('PATH_INFO',''))
+ path_info = quote(environ.get('PATH_INFO',''),safe='/;=,')
 if not environ.get('SCRIPT_NAME'):
 url += path_info[1:]
 else:
Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS	(original)
+++ python/branches/release27-maint/Misc/NEWS	Wed Dec 29 07:30:19 2010
@@ -22,6 +22,11 @@
 Library
 -------
 
+- Issue 10753 - Characters ';','=' and ',' in the PATH_INFO environment
+ variable won't be quoted when the URI is constructed by the wsgiref.util 's
+ request_uri method. According to RFC 3986, these characters can be a part of
+ params in PATH component of URI and need not be quoted.
+
 - Issue 10738: Fix webbrowser.Opera.raise_opts
 
 - Issue 9824: SimpleCookie now encodes , and ; in values to cater to how


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /