mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +01:00
Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e
This commit is contained in:
parent
81ca858678
commit
d6ba94ca28
2339 changed files with 89274 additions and 9328 deletions
|
@ -0,0 +1,19 @@
|
|||
# XMLHttpRequest/resources/conditional.py -- to fake a 304 response
|
||||
|
||||
def main(request, response):
|
||||
tag = request.GET.first("tag", None)
|
||||
match = request.headers.get("If-None-Match", None)
|
||||
date = request.GET.first("date", "")
|
||||
modified = request.headers.get("If-Modified-Since", None)
|
||||
if tag:
|
||||
response.headers.set("ETag", '"%s"' % tag)
|
||||
elif date:
|
||||
response.headers.set("Last-Modified", date)
|
||||
|
||||
if ((match is not None and match == tag) or
|
||||
(modified is not None and modified == date)):
|
||||
response.status = (304, "SUPERCOOL")
|
||||
return ""
|
||||
else:
|
||||
response.headers.set("Content-Type", "text/plain")
|
||||
return "MAYBE NOT"
|
Loading…
Add table
Add a link
Reference in a new issue