summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/xhr/resources/access-control-allow-with-body.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/xhr/resources/access-control-allow-with-body.py')
-rw-r--r--test/wpt/tests/xhr/resources/access-control-allow-with-body.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/wpt/tests/xhr/resources/access-control-allow-with-body.py b/test/wpt/tests/xhr/resources/access-control-allow-with-body.py
new file mode 100644
index 0000000..18564e2
--- /dev/null
+++ b/test/wpt/tests/xhr/resources/access-control-allow-with-body.py
@@ -0,0 +1,15 @@
+def main(request, response):
+ headers = {
+ b"Cache-Control": b"no-store",
+ b"Access-Control-Allow-Headers": b"X-Requested-With",
+ b"Access-Control-Max-Age": 0,
+ b"Access-Control-Allow-Origin": b"*",
+ b"Access-Control-Allow-Methods": b"*",
+ b"Vary": b"Accept-Encoding",
+ b"Content-Type": b"text/plain"
+ }
+
+ for (name, value) in headers.items():
+ response.headers.set(name, value)
+
+ response.content = b"PASS"