changeset 34608:f12de15c5711

configitems: register the 'web.guessmime' config
author Boris Feld <boris.feld@octobus.net>
date Wed, 11 Oct 2017 04:15:24 +0200
parents 3e6b36ba16ac
children 9d97487514c7
files mercurial/configitems.py mercurial/hgweb/webcommands.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: