fix cache-control header
This commit is contained in:
parent
1aa487ff1a
commit
b5bc63e76b
@ -16,7 +16,7 @@ class Controller(object):
|
|||||||
if last_modified is not None:
|
if last_modified is not None:
|
||||||
headers["Last-Modified"] = last_modified.astimezone(tz=timezone.utc).strftime("%a, %d %b %Y %H:%M:%S GMT")
|
headers["Last-Modified"] = last_modified.astimezone(tz=timezone.utc).strftime("%a, %d %b %Y %H:%M:%S GMT")
|
||||||
if max_age is not None:
|
if max_age is not None:
|
||||||
headers["Cache-Control"] = "max-age: {0}".format(max_age)
|
headers["Cache-Control"] = "max-age={0}".format(max_age)
|
||||||
for key, value in headers.items():
|
for key, value in headers.items():
|
||||||
self.handler.send_header(key, value)
|
self.handler.send_header(key, value)
|
||||||
self.handler.end_headers()
|
self.handler.end_headers()
|
||||||
|
Loading…
Reference in New Issue
Block a user