Ticket #330 (closed defect: fixed)
IE 6.0 Accept header makes Paste go boom
| Reported by: | cleverdevil | Owned by: | ianb |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | paste | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
We've been getting emails with tracebacks from our application, and we finally tracked down the problem. It looks like IE 6 is sending an Accept header that Paste can't parse. Here is how we can reproduce the issue:
from paste.util.mimeparse import parse_mime_type parse_mime_type('text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2')
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.5/site-packages/Paste-1.7.1-py2.5.egg/paste/util/mimeparse.py", line 35, in parse_mime_type (type, subtype) = parts[0].split("/") ValueError?: too many values to unpack
This causes our application (a TurboGears? 2.0 application) to explode in this way for IE 6.0 users in certain cases.
