Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
d4a12a83
Commit
d4a12a83
authored
Dec 01, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test that wsgi unquotes PATH_INFO
parent
926ffd02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
greentest/wsgi_test.py
greentest/wsgi_test.py
+15
-0
No files found.
greentest/wsgi_test.py
View file @
d4a12a83
...
...
@@ -412,6 +412,21 @@ class TestHttps(TestCase):
g
.
kill
(
block
=
True
)
class
TestInternational
(
TestCase
):
def
application
(
self
,
environ
,
start_response
):
assert
environ
[
'PATH_INFO'
]
==
'/
\
xd0
\
xbf
\
xd1
\
x80
\
xd0
\
xb8
\
xd0
\
xb2
\
xd0
\
xb5
\
xd1
\
x82
'
,
environ
[
'PATH_INFO'
]
assert
environ
[
'QUERY_STRING'
]
==
'%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81=%D0%BE%D1%82%D0%B2%D0%B5%D1%82'
,
environ
[
'QUERY_STRING'
]
start_response
(
"200 PASSED"
,
[])
return
[]
def
test
(
self
):
sock
=
socket
.
connect_tcp
((
'127.0.0.1'
,
self
.
port
))
sock
.
sendall
(
'GET /%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82?%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81=%D0%BE%D1%82%D0%B2%D0%B5%D1%82 HTTP/1.1
\
r
\
n
Host: localhost
\
r
\
n
Connection: close
\
r
\
n
\
r
\
n
'
)
result
=
sock
.
makefile
().
read
()
assert
'200 PASSED'
in
result
,
result
class
HTTPRequest
(
urllib2
.
Request
):
"""Hack urllib2.Request to support PUT and DELETE methods."""
...
...
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