summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/modules/resources/redirect.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/workers/modules/resources/redirect.py')
-rw-r--r--testing/web-platform/tests/workers/modules/resources/redirect.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/modules/resources/redirect.py b/testing/web-platform/tests/workers/modules/resources/redirect.py
new file mode 100644
index 0000000000..396bd4c4b2
--- /dev/null
+++ b/testing/web-platform/tests/workers/modules/resources/redirect.py
@@ -0,0 +1,8 @@
+def main(request, response):
+ """Simple handler that causes redirection.
+ This is placed here to stay within the same directory during redirects,
+ to avoid issues like https://crbug.com/1136775.
+ """
+ response.status = 302
+ location = request.GET.first(b"location")
+ response.headers.set(b"Location", location)