mercurial/hgweb.py
changeset 2095 0bf2a9e5eff1
parent 1964 778281d46bb2
child 2103 caccf539c9a4
--- a/mercurial/hgweb.py	Wed Apr 19 11:39:34 2006 -0700
+++ b/mercurial/hgweb.py	Wed Apr 19 11:41:22 2006 -0700
@@ -419,7 +419,8 @@
         mt = mimetypes.guess_type(f)[0]
         rawtext = text
         if util.binary(text):
-            text = "(binary:%s)" % mt
+            text = "(binary:%s)" % (mt or 'data')
+        mt = mt or 'text/plain'
 
         def lines():
             for l, t in enumerate(text.splitlines(1)):