diff -r c23fa3103925 -r 67873ec0f4ce mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Thu Oct 05 14:13:20 2017 -0400 +++ b/mercurial/hgweb/common.py Thu Oct 05 14:17:50 2017 -0400 @@ -208,7 +208,7 @@ encoding.environ.get("EMAIL") or "") def caching(web, req): - tag = 'W/"%s"' % web.mtime + tag = r'W/"%d"' % web.mtime if req.env.get('HTTP_IF_NONE_MATCH') == tag: raise ErrorResponse(HTTP_NOT_MODIFIED) req.headers.append(('ETag', tag))