summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs')
-rw-r--r--toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs18
1 files changed, 18 insertions, 0 deletions
diff --git a/toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs b/toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs
new file mode 100644
index 0000000000..98f9aed4d0
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/data/iconsRedirect.sjs
@@ -0,0 +1,18 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Redirect a request for an icon to a different place, using a different
+ * content-type.
+ */
+
+function handleRequest(request, response) {
+ response.setStatusLine("1.1", 302, "Moved");
+ if (request.queryString == "type=invalid") {
+ response.setHeader("Content-Type", "image/png", false);
+ response.setHeader("Location", "/head_search.js", false);
+ } else {
+ response.setHeader("Content-Type", "text/html", false);
+ response.setHeader("Location", "remoteIcon.ico", false);
+ }
+}