hgweb: produce native string for etag value
Also use %d since we know mtime is numeric.
Differential Revision: https://phab.mercurial-scm.org/D966
--- 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))