Massage content-type before sending it to mime detection

Fixes #67
This commit is contained in:
Aldo Cortesi 2013-06-09 11:26:44 +12:00
parent 9f6657727b
commit 1a5c27aa7d

View File

@ -526,6 +526,7 @@ class ConsoleMaster(flow.FlowMaster):
def spawn_external_viewer(self, data, contenttype):
if contenttype:
contenttype = contenttype.split(";")[0]
ext = mimetypes.guess_extension(contenttype) or ""
else:
ext = ""