Mercurial > hg
diff mercurial/hgweb/webcommands.py @ 37512:aac97d043e6d
hgweb: drop archivespecs from requestcontext
It's a constant.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Apr 2018 22:33:55 +0900 |
parents | 876d54f800cf |
children | f83cb91b052e |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Sun Apr 01 22:32:34 2018 +0900 +++ b/mercurial/hgweb/webcommands.py Sun Apr 01 22:33:55 2018 +0900 @@ -1164,7 +1164,7 @@ allowed = web.configlist("web", "allow_archive") key = web.req.qsparams['node'] - if type_ not in web.archivespecs: + if type_ not in webutil.archivespecs: msg = 'Unsupported archive type: %s' % type_ raise ErrorResponse(HTTP_NOT_FOUND, msg) @@ -1193,7 +1193,7 @@ raise ErrorResponse(HTTP_NOT_FOUND, 'file(s) not found: %s' % file) - mimetype, artype, extension, encoding = web.archivespecs[type_] + mimetype, artype, extension, encoding = webutil.archivespecs[type_] web.res.headers['Content-Type'] = mimetype web.res.headers['Content-Disposition'] = 'attachment; filename=%s%s' % (