summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py')
-rw-r--r--testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py b/testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py
new file mode 100644
index 000000000..fdc626539
--- /dev/null
+++ b/testing/web-platform/tests/XMLHttpRequest/resources/parse-headers.py
@@ -0,0 +1,10 @@
+import json
+
+def main(request, response):
+
+ content = ""
+ if "my-custom-header" in request.GET:
+ val = request.GET.first("my-custom-header")
+ response.headers.set("My-Custom-Header", val)
+
+ return content