Skip to content

Commit e5b00c7

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "wsgi pre_auth fixes"
2 parents 3c2e856 + 3524718 commit e5b00c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swift/common/wsgi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def make_pre_authed_env(env, method=None, path=None, agent='Swift'):
298298
"""
299299
newenv = {}
300300
for name in ('eventlet.posthooks', 'HTTP_USER_AGENT',
301-
'PATH_INFO', 'REMOTE_USER', 'REQUEST_METHOD',
301+
'PATH_INFO', 'QUERY_STRING', 'REMOTE_USER', 'REQUEST_METHOD',
302302
'SCRIPT_NAME', 'SERVER_NAME', 'SERVER_PORT',
303303
'SERVER_PROTOCOL', 'swift.cache', 'swift.source',
304304
'swift.trans_id'):
@@ -307,6 +307,9 @@ def make_pre_authed_env(env, method=None, path=None, agent='Swift'):
307307
if method:
308308
newenv['REQUEST_METHOD'] = method
309309
if path:
310+
if '?' in path:
311+
path, query_string = path.split('?', 1)
312+
newenv['QUERY_STRING'] = query_string
310313
newenv['PATH_INFO'] = path
311314
if agent:
312315
newenv['HTTP_USER_AGENT'] = (

0 commit comments

Comments
 (0)