summaryrefslogtreecommitdiffstats
path: root/dom/security/test/https-only/file_http_background_request.sjs
diff options
context:
space:
mode:
Diffstat (limited to 'dom/security/test/https-only/file_http_background_request.sjs')
-rw-r--r--dom/security/test/https-only/file_http_background_request.sjs15
1 files changed, 15 insertions, 0 deletions
diff --git a/dom/security/test/https-only/file_http_background_request.sjs b/dom/security/test/https-only/file_http_background_request.sjs
new file mode 100644
index 0000000000..ef0e2ce5bd
--- /dev/null
+++ b/dom/security/test/https-only/file_http_background_request.sjs
@@ -0,0 +1,15 @@
+// Custom *.sjs file specifically for the needs of Bug 1663396
+
+function handleRequest(request, response) {
+ // avoid confusing cache behaviors
+ response.setHeader("Cache-Control", "no-cache", false);
+
+ if (request.scheme === "https") {
+ // Simulating a timeout by processing the https request
+ // async and *never* return anything!
+ response.processAsync();
+ return;
+ }
+ // we should never get here; just in case, return something unexpected
+ response.write("do'h");
+}