1
0
Fork 0
firefox/dom/security/test/https-first/download_server.sjs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
475 B
JavaScript

function handleRequest(request, response) {
// Only answer to http, in case request is in https let the reply time out.
if (request.scheme === "https") {
response.processAsync();
return;
}
response.setHeader("Cache-Control", "no-cache", false);
// Send some file, e.g. an image
response.setHeader(
"Content-Disposition",
"attachment; filename=some-file.png"
);
response.setHeader("Content-Type", "image/png");
response.write("Success!");
}