We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07229b7 commit 0210588Copy full SHA for 0210588
1 file changed
ietf/utils/validators.py
@@ -80,7 +80,7 @@ def validate_mime_type(file, valid):
80
if mime_type == 'text/x-c++' and re.search('(?m)^virtual\s', raw):
81
mod = raw.replace(str('virtual'), str(' virtual'))
82
mime_type, encoding = get_mime_type(mod)
83
- if not mime_type in valid:
+ if valid and not mime_type in valid:
84
raise ValidationError('Found content with unexpected mime type: %s. Expected one of %s.' %
85
(mime_type, ', '.join(valid) ))
86
return mime_type, encoding
0 commit comments