configitems: register the 'web.guessmime' config
authorBoris Feld <boris.feld@octobus.net>
Wed, 11 Oct 2017 04:15:24 +0200
changeset 34608 f12de15c5711
parent 34607 3e6b36ba16ac
child 34609 9d97487514c7
configitems: register the 'web.guessmime' config
mercurial/configitems.py
mercurial/hgweb/webcommands.py
--- a/mercurial/configitems.py	Wed Oct 11 04:15:08 2017 +0200
+++ b/mercurial/configitems.py	Wed Oct 11 04:15:24 2017 +0200
@@ -736,6 +736,9 @@
 coreconfigitem('web', 'deny_push',
     default=list,
 )
+coreconfigitem('web', 'guessmime',
+    default=False,
+)
 coreconfigitem('web', 'accesslog',
     default='-',
 )
--- a/mercurial/hgweb/webcommands.py	Wed Oct 11 04:15:08 2017 +0200
+++ b/mercurial/hgweb/webcommands.py	Wed Oct 11 04:15:24 2017 +0200
@@ -93,7 +93,7 @@
 
 @webcommand('rawfile')
 def rawfile(web, req, tmpl):
-    guessmime = web.configbool('web', 'guessmime', False)
+    guessmime = web.configbool('web', 'guessmime')
 
     path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
     if not path: