Use application/octet-stream as the content-type of unknown binary files
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Thu, 20 Apr 2006 15:42:02 +0200
changeset 2103 caccf539c9a4
parent 2102 c62112815801
child 2104 f1085d34d20d
Use application/octet-stream as the content-type of unknown binary files
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Wed Apr 19 22:18:03 2006 -0700
+++ b/mercurial/hgweb.py	Thu Apr 20 15:42:02 2006 +0200
@@ -419,7 +419,8 @@
         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():