mirror of
https://github.com/servo/servo.git
synced 2025-10-16 00:10:23 +01:00
Update web-platform-tests to revision 89aa3f42131cce5a77268ddaeb2fab8a2e29c2a6
This commit is contained in:
parent
39963266ae
commit
ea00d34098
392 changed files with 5974 additions and 7614 deletions
|
@ -13,6 +13,9 @@ DATEHDRS = set(['date', 'expires', 'last-modified'])
|
|||
def main(request, response):
|
||||
dispatch = request.GET.first("dispatch", None)
|
||||
uuid = request.GET.first("uuid", None)
|
||||
|
||||
if request.method == "OPTIONS":
|
||||
return handle_preflight(uuid, request, response)
|
||||
if not uuid:
|
||||
response.status = (404, "Not Found")
|
||||
response.headers.set("Content-Type", "text/plain")
|
||||
|
@ -25,6 +28,14 @@ def main(request, response):
|
|||
response.headers.set("Content-Type", "text/plain")
|
||||
return "Fallthrough"
|
||||
|
||||
def handle_preflight(uuid, request, response):
|
||||
response.status = (200, "OK")
|
||||
response.headers.set("Access-Control-Allow-Origin", "*")
|
||||
response.headers.set("Access-Control-Allow-Methods", "GET")
|
||||
response.headers.set("Access-Control-Allow-Headers", "*")
|
||||
response.headers.set("Access-Control-Max-Age", "86400")
|
||||
return "Preflight request"
|
||||
|
||||
def handle_state(uuid, request, response):
|
||||
response.headers.set("Content-Type", "text/plain")
|
||||
return json.dumps(request.server.stash.take(uuid))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue