RFC 1521 does not disallow star characters in the type or subtype of a
Content-Type header.
# don't care about the spaces
^[\ \t]*
#main type and sub type or any other value
- ([a-z0-9\-/\.]+)
+ ([a-z0-9\-/\.\*]+)
# grab the trailing spaces, colons
[\ \t;]*""", re.IGNORECASE | re.VERBOSE)
setup(name='flanker',
- version='0.4.34',
+ version='0.4.35',
description='Mailgun Parsing Tools',
long_description=open('README.rst').read(),
classifiers=[],
--- /dev/null
+from nose.tools import *
+
+from flanker.mime.message.headers import parsing
+
+def test_content_type_star():
+ _, ctype = parsing.parse_header('Content-Type: image/* ; name="Stuart *Wells.PNG"')
+ eq_(ctype.value, 'image/*')