[ python-Bugs-990307 ] cgi.parse_qsl broken

SourceForge.net noreply at sourceforge.net
Tue Jul 13 19:17:53 CEST 2004


Bugs item #990307, was opened at 2004-07-13 17:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=990307&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: A.M. Kuchling (akuchling)
Summary: cgi.parse_qsl broken

Initial Comment:
The cgi module has been changed so that now
parse_qsl("", keep_blank_values=True) returns [('',
'')].  I think that's wrong.  I thought about changing
it so that items with empty names are skipped but
test_cgi requires that "=a" produce [('', 'a')].  I
also thought about special casing the empty string to
return [] but test_cgi checks that parse_qsl("",
strict_parsing=1) raises ValueError.  That seems wrong
to me but I'm scared to change it since there may be
code out there that depends on this behavior.  OTOH, it
seems highly unlikely that people would find the strict
parsing flag useful (there's too much broken stuff on
the net).

The minimal fix would be to not generate any items that
are equal to ('', '').  Looking for advice.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=990307&group_id=5470


More information about the Python-bugs-list mailing list