mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee
This commit is contained in:
parent
c5f7c9ccf3
commit
e891345f26
1328 changed files with 36632 additions and 20588 deletions
|
@ -0,0 +1,15 @@
|
|||
def main(request, response):
|
||||
response.headers.set("Access-Control-Allow-Origin", "*")
|
||||
response.headers.set("Access-Control-Max-Age", 0)
|
||||
response.headers.set('Access-Control-Allow-Headers', "x-test")
|
||||
|
||||
if request.method == "OPTIONS":
|
||||
if not request.headers.get("User-Agent"):
|
||||
response.content = "FAIL: User-Agent header missing in preflight request."
|
||||
response.status = 400
|
||||
else:
|
||||
if request.headers.get("User-Agent"):
|
||||
response.content = "PASS"
|
||||
else:
|
||||
response.content = "FAIL: User-Agent header missing in request"
|
||||
response.status = 400
|
Loading…
Add table
Add a link
Reference in a new issue