comparison mercurial/hgweb/webcommands.py @ 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 2e32c6a31cc7
children 4182d2065e7a
comparison
equal deleted inserted replaced
34607:3e6b36ba16ac 34608:f12de15c5711
91 else: 91 else:
92 return changelog(web, req, tmpl) 92 return changelog(web, req, tmpl)
93 93
94 @webcommand('rawfile') 94 @webcommand('rawfile')
95 def rawfile(web, req, tmpl): 95 def rawfile(web, req, tmpl):
96 guessmime = web.configbool('web', 'guessmime', False) 96 guessmime = web.configbool('web', 'guessmime')
97 97
98 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0]) 98 path = webutil.cleanpath(web.repo, req.form.get('file', [''])[0])
99 if not path: 99 if not path:
100 content = manifest(web, req, tmpl) 100 content = manifest(web, req, tmpl)
101 req.respond(HTTP_OK, web.ctype) 101 req.respond(HTTP_OK, web.ctype)