xkmato / mimeparse

Automatically exported from code.google.com/p/mimeparse
MIT License
0 stars 0 forks source link

Python mimeparse. #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by matt.goo...@gmail.com on 19 Oct 2009 at 11:01

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r20.

Original comment by joe.gregorio@gmail.com on 15 Sep 2010 at 8:35