Skip to content

Commit

Permalink
[#1534] if mimetype is none then fall back to provided mimetype
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Feb 28, 2014
1 parent e15651d commit 1a22abb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/controllers/package.py
Expand Up @@ -1236,7 +1236,8 @@ def resource_download(self, id, resource_id, filename=None):
abort(404, _('Resource data not found'))
response.headers.update(dict(headers))
content_type, content_enc = mimetypes.guess_type(rsc.get('url',''))
response.headers['Content-Type'] = content_type
if content_type:
response.headers['Content-Type'] = content_type
response.status = status
return app_iter
elif not 'url' in rsc:
Expand Down

0 comments on commit 1a22abb

Please sign in to comment.