summaryrefslogtreecommitdiffstats
path: root/toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs')
-rw-r--r--toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs15
1 files changed, 15 insertions, 0 deletions
diff --git a/toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs b/toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs
new file mode 100644
index 0000000000..f77d5351b5
--- /dev/null
+++ b/toolkit/components/httpsonlyerror/tests/browser/file_errorpage_timeout_server.sjs
@@ -0,0 +1,15 @@
+// Custom *.sjs file specifically for the needs of Bug 1657348
+
+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");
+}