Revision 69b5681ee7aa5a028eb694b2c93bfd48c1ef08e4 authored by Florian Rivoal on 20 April 2018, 10:06:58 UTC, committed by Florian Rivoal on 20 April 2018, 10:17:40 UTC
Corresponds to the spec changes from https://github.com/w3c/csswg-drafts/issues/2510
1 parent e2f8447
blue-png-cachable.py
import os
import time
def main(request, response):
"""Serves the contents in blue.png but with a Cache-Control header.
Emits a Cache-Control header with max-age set to 1h to allow the browser
cache the image. Used for testing behaviors involving caching logics.
"""
image_path = os.path.join(os.path.dirname(__file__), "blue.png")
response.headers.set("Cache-Control", "max-age=3600")
response.headers.set("Content-Type", "image/png")
response.content = open(image_path, mode='rb').read()
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...