summaryrefslogtreecommitdiffstats
path: root/toolkit/components/antitracking/test/browser/redirect.sjs
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/antitracking/test/browser/redirect.sjs')
-rw-r--r--toolkit/components/antitracking/test/browser/redirect.sjs11
1 files changed, 11 insertions, 0 deletions
diff --git a/toolkit/components/antitracking/test/browser/redirect.sjs b/toolkit/components/antitracking/test/browser/redirect.sjs
new file mode 100644
index 0000000000..4645aedca5
--- /dev/null
+++ b/toolkit/components/antitracking/test/browser/redirect.sjs
@@ -0,0 +1,11 @@
+function handleRequest(aRequest, aResponse) {
+ aResponse.setStatusLine(aRequest.httpVersion, 302);
+
+ let query = aRequest.queryString;
+ let locations = query.split("|");
+ let nextLocation = locations.shift();
+ if (locations.length) {
+ nextLocation += "?" + locations.join("|");
+ }
+ aResponse.setHeader("Location", nextLocation);
+}