diff options
| -rw-r--r-- | docs/news.txt | 3 | ||||
| -rw-r--r-- | paste/util/mimeparse.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/news.txt b/docs/news.txt index a53d4fb..7151814 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -13,6 +13,9 @@ svn trunk * Fix :mod:`paste.auth.cookie`, which would insert newlines for long cookies. +* :mod:`paste.util.mimeparse` parses a single ``*`` in Accept headers + (sent by IE 6). + 1.7.2 ----- diff --git a/paste/util/mimeparse.py b/paste/util/mimeparse.py index 08d0e32..2523da1 100644 --- a/paste/util/mimeparse.py +++ b/paste/util/mimeparse.py @@ -32,7 +32,10 @@ def parse_mime_type(mime_type): parts = mime_type.split(";") params = dict([tuple([s.strip() for s in param.split("=")])\ for param in parts[1:] ]) - (type, subtype) = parts[0].split("/") + try: + (type, subtype) = parts[0].split("/") + except ValueError: + type, subtype = parts[0], '*' return (type.strip(), subtype.strip(), params) def parse_media_range(range): |
