diff -r c6274913eba5 -r 15ef6b9c1f2f mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Jan 22 09:28:51 2008 +0100 +++ b/mercurial/hgweb/webcommands.py Tue Jan 22 12:31:55 2008 +0100 @@ -30,7 +30,7 @@ path = fctx.path() text = fctx.data() mt = mimetypes.guess_type(path)[0] - if util.binary(text): + if mt is None or util.binary(text): mt = mt or 'application/octet-stream' req.httphdr(mt, path, len(text))