summaryrefslogtreecommitdiff
path: root/tests/test_wsgi.py
diff options
context:
space:
mode:
authorHsiaoming Yang <me@lepture.com>2018-02-13 18:24:07 +0900
committerHsiaoming Yang <me@lepture.com>2018-02-13 18:24:07 +0900
commite07303d989ba023b8edfea0754e6b2d8e4eebaaa (patch)
tree4160ce135fb34c492be8531f543007b32e53664f /tests/test_wsgi.py
parent8b1799738de72dd45d1136d943a049d45617ad09 (diff)
downloadwerkzeug-patch-proxy.tar.gz
Fix ProxyMiddleware with query stringpatch-proxy
Diffstat (limited to 'tests/test_wsgi.py')
-rw-r--r--tests/test_wsgi.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py
index 53a3a529..9d2f6807 100644
--- a/tests/test_wsgi.py
+++ b/tests/test_wsgi.py
@@ -480,7 +480,7 @@ def test_http_proxy(dev_server):
return Response(u'%s|%s|%s' % (
request.headers.get('X-Special'),
request.environ['HTTP_HOST'],
- request.path,
+ request.full_path,
))
'''
@@ -509,11 +509,15 @@ def test_http_proxy(dev_server):
assert rv.data == b'ROOT'
rv = client.get('/foo/bar')
- assert rv.data.decode('ascii') == 'foo|faked.invalid|/foo/bar'
+ assert rv.data.decode('ascii') == 'foo|faked.invalid|/foo/bar?'
rv = client.get('/bar/baz')
- assert rv.data.decode('ascii') == 'bar|localhost|/baz'
+ assert rv.data.decode('ascii') == 'bar|localhost|/baz?'
rv = client.get('/autohost/aha')
- assert rv.data.decode('ascii') == 'None|%s|/autohost/aha' % url_parse(
+ assert rv.data.decode('ascii') == 'None|%s|/autohost/aha?' % url_parse(
server.url).ascii_host
+
+ # test query string
+ rv = client.get('/bar/baz?a=a&b=b')
+ assert rv.data.decode('ascii') == 'bar|localhost|/baz?a=a&b=b'