diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2004-07-19 15:38:11 +0000 |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2004-07-19 15:38:11 +0000 |
commit | 66edb6295f956af9c559ef037c5016c9f6b64261 (patch) | |
tree | 8aa6adeef3e152e189752fab16046dfe477bb306 /Lib/cgi.py | |
parent | 36a0f89c37f535254043712168cd9c0a4f1a7f40 (diff) | |
download | cpython-git-66edb6295f956af9c559ef037c5016c9f6b64261.tar.gz |
Don't return spurious empty fields if 'keep_empty_values' is True.
Fixes SF bug #990307.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-x | Lib/cgi.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py index 487b01e3f2..7c3d657943 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -209,6 +209,8 @@ def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')] r = [] for name_value in pairs: + if not name_value and not strict_parsing: + continue nv = name_value.split('=', 1) if len(nv) != 2: if strict_parsing: |