[Patches] [ python-Patches-901480 ] urllib2.parse_http_list bugfix 735248

SourceForge.net noreply at sourceforge.net
Sun Dec 19 09:26:56 CET 2004


Patches item #901480, was opened at 2004-02-20 15:34
Message generated for change (Comment added) made by titus
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=901480&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2.parse_http_list bugfix  735248

Initial Comment:
With unquoted elements, the current code forgets to 
throw away the already processed portion.

>>> urllib2.parse_http_list('a,b,c')
['a', 'a,b', 'a,b,c']

The current code does not handle escaped characters.
>>> len(urllib2.parse_http_list(r'"a"\,"b","c"'))
3

This patch replaces parse_http_list and adds a helper 
function.  I also added docstricts for these cases, and a 
few others (which the current code does get right, but 
which are not ...)


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

Comment By: Titus Brown (titus)
Date: 2004-12-19 00:26

Message:
Logged In: YES 
user_id=23486

Fix works against latest CVS. As noted it does fix bug 735248 and also 
works on quoted strings.

I made a context diff against the current CVS.  It's at

http://issola.caltech.edu/~t/transfer/patch-901480-parse.diff

This diff fixes a docstring & also allows direct application to the current 
CVS.

Recommend application.


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

Comment By: Jim Jewett (jimjjewett)
Date: 2004-02-20 15:42

Message:
Logged In: YES 
user_id=764593

The cutoff portion just said that the current code did get the 
remaining tests right, but I might have missed them myself if I 
hadn't been looking at the old code when I wrote it.  So I 
want them there for the next person.

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

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


More information about the Patches mailing list