# HG changeset patch # User Alexis S. L. Carvalho # Date 1145540522 -7200 # Node ID caccf539c9a464c045ab648793910347327c4121 # Parent c621128158012b800aff4d5ead29d4747b8ffbd2 Use application/octet-stream as the content-type of unknown binary files diff --git a/mercurial/hgweb.py b/mercurial/hgweb.py --- a/mercurial/hgweb.py +++ b/mercurial/hgweb.py @@ -419,7 +419,8 @@ class hgweb(object): mt = mimetypes.guess_type(f)[0] rawtext = text if util.binary(text): - text = "(binary:%s)" % (mt or 'data') + mt = mt or 'application/octet-stream' + text = "(binary:%s)" % mt mt = mt or 'text/plain' def lines():