This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jimjjewett
Recipients
Date 2003-05-09.14:09:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
parse_http_list should split a string on commas, unless 
the commas are within a quoted-string.  (It allows only 
the "" quote, and not the single-quote, but this seems to 
follow the RFC.)

If there are not quoted-strings, it repeats the first tokens 
as part of subsequent tokens.

parse_http_list ('a,b') => ['a','a,b']
It should return ['a','b']

parse_http_list ('a,b,c') => ['a','a,b','a,b,c']
It should return ['a','b','c']


Patch:  On (cvs version) line 882, when no quote is found 
and inquote is false, reset the start position to after the 
comma.

        if q == -1:
            if inquote:
                raise ValueError, "unbalanced quotes"
            else:
                list.append(s[start:i+c])
                i = i + c + 1
                start = i            #New line
                continue

History
Date User Action Args
2007-08-23 14:13:13adminlinkissue735248 messages
2007-08-23 14:13:13admincreate