[Python-checkins] python/dist/src/Lib cgi.py,1.77,1.78

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Sun Mar 21 17:16:19 EST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7486/Lib
Modified Files:
	cgi.py 
Log Message:
Change parse_qsl() to accept control-name's with no equal sign (e.g., "name")
when keep_blank_values is true.
Index: cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cgi.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** cgi.py	12 Feb 2004 17:35:06 -0000	1.77
--- cgi.py	21 Mar 2004 22:16:15 -0000	1.78
***************
*** 214,218 ****
 if strict_parsing:
 raise ValueError, "bad query field: %r" % (name_value,)
! continue
 if len(nv[1]) or keep_blank_values:
 name = urllib.unquote(nv[0].replace('+', ' '))
--- 214,222 ----
 if strict_parsing:
 raise ValueError, "bad query field: %r" % (name_value,)
! # Handle case of a control-name with no equal sign
! if keep_blank_values:
! nv.append('')
! else:
! continue
 if len(nv[1]) or keep_blank_values:
 name = urllib.unquote(nv[0].replace('+', ' '))


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /