Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
299fa4cb
Commit
299fa4cb
authored
Dec 29, 2010
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Issue 10753 - Don't quote ;=, in the PATH_INFO envvar.
parent
de3aa7fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
Lib/test/test_wsgiref.py
Lib/test/test_wsgiref.py
+4
-0
Lib/wsgiref/util.py
Lib/wsgiref/util.py
+1
-1
Misc/NEWS
Misc/NEWS
+5
-0
No files found.
Lib/test/test_wsgiref.py
View file @
299fa4cb
...
...
@@ -342,6 +342,10 @@ class UtilityTests(TestCase):
self
.
checkReqURI
(
"http://127.0.0.1/sp%C3%A4m"
,
SCRIPT_NAME
=
"/späm"
)
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
,
...
...
Lib/wsgiref/util.py
View file @
299fa4cb
...
...
@@ -64,7 +64,7 @@ def request_uri(environ, include_query=True):
"""Return the full request URI, optionally including the query string"""
url
=
application_uri
(
environ
)
from
urllib.parse
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
:
...
...
Misc/NEWS
View file @
299fa4cb
...
...
@@ -20,6 +20,11 @@ Core and Builtins
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment