# HG changeset patch # User Augie Fackler # Date 2017-10-05 18:17:50 # Node ID 67873ec0f4ce595543312e91848ab98754006efa # Parent c23fa3103925848c26be72151003ffef254b444a hgweb: produce native string for etag value Also use %d since we know mtime is numeric. Differential Revision: https://phab.mercurial-scm.org/D966 diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py +++ b/mercurial/hgweb/common.py @@ -208,7 +208,7 @@ def get_contact(config): 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))