Mercurial > cpython-lru_cache-weakref
diff Lib/cgi.py @ 32758:859ea8612eb0 legacy-trunk
Don't return spurious empty fields if 'keep_empty_values' is True.
Fixes SF bug #990307.
| author | Neil Schemenauer <nascheme@enme.ucalgary.ca> |
|---|---|
| date | Mon, 19 Jul 2004 15:38:11 +0000 |
| parents | 3e49eb32470b |
| children | 846ba2972d7c |
line wrap: on
line diff
--- a/Lib/cgi.py Mon Jul 19 10:07:28 2004 +0000 +++ b/Lib/cgi.py Mon Jul 19 15:38:11 2004 +0000 @@ -209,6 +209,8 @@ 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:
