hgweb: produce native string for etag value
authorAugie Fackler <augie@google.com>
Thu, 05 Oct 2017 14:17:50 -0400
changeset 34511 67873ec0f4ce
parent 34510 c23fa3103925
child 34512 482d6f6dba91
hgweb: produce native string for etag value Also use %d since we know mtime is numeric. Differential Revision: https://phab.mercurial-scm.org/D966
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))