Commit e34591e0 authored by 's avatar

Merged fix for ignoring passed in content type from 2.2 branch

parent 3ead586a
......@@ -83,7 +83,7 @@
#
##############################################################################
"""A utility module for content-type handling."""
__version__='$Revision: 1.10 $'[11:-2]
__version__='$Revision: 1.11 $'[11:-2]
src="""
htm, html: text/html
......@@ -171,7 +171,7 @@ def guess_content_type(name='', body='', default=None):
if find_binary(body) >= 0:
type='application/octet-stream'
else:
type=(text_type(body) or default
type=(default or text_type(body)
or 'text/x-unknown-content-type')
else:
type=default or 'text/x-unknown-content-type'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment