Mercurial > hg
comparison mercurial/hgweb/common.py @ 34511:67873ec0f4ce
hgweb: produce native string for etag value
Also use %d since we know mtime is numeric.
Differential Revision: https://phab.mercurial-scm.org/D966
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 05 Oct 2017 14:17:50 -0400 |
parents | d5b2beca16c0 |
children | f28c85e29afc |
comparison
equal
deleted
inserted
replaced
34510:c23fa3103925 | 34511:67873ec0f4ce |
---|---|
206 return (config("web", "contact") or | 206 return (config("web", "contact") or |
207 config("ui", "username") or | 207 config("ui", "username") or |
208 encoding.environ.get("EMAIL") or "") | 208 encoding.environ.get("EMAIL") or "") |
209 | 209 |
210 def caching(web, req): | 210 def caching(web, req): |
211 tag = 'W/"%s"' % web.mtime | 211 tag = r'W/"%d"' % web.mtime |
212 if req.env.get('HTTP_IF_NONE_MATCH') == tag: | 212 if req.env.get('HTTP_IF_NONE_MATCH') == tag: |
213 raise ErrorResponse(HTTP_NOT_MODIFIED) | 213 raise ErrorResponse(HTTP_NOT_MODIFIED) |
214 req.headers.append(('ETag', tag)) | 214 req.headers.append(('ETag', tag)) |
215 | 215 |
216 def cspvalues(ui): | 216 def cspvalues(ui): |