diff -r ec0af9c59270 -r 1a1972b1a1ff mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sat Mar 10 12:35:38 2018 -0800 +++ b/mercurial/hgweb/hgwebdir_mod.py Sat Mar 10 11:46:52 2018 -0800 @@ -510,7 +510,7 @@ url += '/' vars = {} - styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq, config, + styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq.req, config, self.templatepath) if style == styles[0]: vars['style'] = style