diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-10-03 05:38:07 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-10-03 05:38:07 (GMT) |
commit | a02e18a43f61543c911c82698d3cf44c8c11a0c2 (patch) | |
tree | 9a79c81d15cd6e723c4215d7c12b1ea52024ca07 /Lib/http/server.py | |
parent | d470527aecebd5982cda4d6e6fcbeebeca33976c (diff) | |
download | cpython-a02e18a43f61543c911c82698d3cf44c8c11a0c2.zip cpython-a02e18a43f61543c911c82698d3cf44c8c11a0c2.tar.gz cpython-a02e18a43f61543c911c82698d3cf44c8c11a0c2.tar.bz2 |
Issue #25232: Fix CGIRequestHandler's splitting of URL query
Patch from Xiang Zhang.
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r-- | Lib/http/server.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index ce0f6cf..9a7c976 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -1032,11 +1032,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler): break # find an explicit query string, if present. - i = rest.rfind('?') - if i >= 0: - rest, query = rest[:i], rest[i+1:] - else: - query = '' + rest, _, query = rest.partition('?') # dissect the part after the directory name into a script name & # a possible additional path, to be stored in PATH_INFO. |