Closed GoogleCodeExporter closed 9 years ago
Oops, sorry ...
Title should be: Python parse_mime_type does not handle header params correctly
What steps will reproduce the problem?
Run the following in a Python shell:
>>> mimeparse.parse_mime_type('type/subtype; param="=value="')
What is the expected output? What do you see instead?
Expected: ('type', 'subtype', {'param': '"=value="'})
Instead, it raises a ValueError.
What version of the product are you using? On what operating system?
v 0.1.2
Please provide any additional information below.
The problem is that it splits the param on *all* '=' chars instead of just the
first. Changing line 32 to split using, param.split("=", 1), fixes the problem.
Original comment by matt.goo...@gmail.com
on 19 Oct 2009 at 11:08
This issue was closed by revision r20.
Original comment by joe.gregorio@gmail.com
on 15 Sep 2010 at 8:35
Original issue reported on code.google.com by
matt.goo...@gmail.com
on 19 Oct 2009 at 11:01