Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/clear-site-data/support/get-resource-to-cache.py

Issue 2913553004: Add the 'cache' datatype to the clear-site-data WPT (Closed)
Patch Set: Rebase, syntax, cache busting. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # A support server that returns a resource to be cached for one year.
2 #
3 # However, if the request contains the "Cache-Control: only-if-cached;" header,
4 # the server returns status code 500, since such a request should never have
5 # reached it.
6 def main(request, response):
7 if ("Cache-Control" in request._headers and
8 request._headers["Cache-Control"] == "only-if-cached"):
9 response.status = 500 # Internal server error.
10 return
11
12 return ([("Content-Type", "text/plain"),
13 ("Cache-Control", "max-age=31536000")],
14 "Resource to be cached for 365 days.")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698