summaryrefslogtreecommitdiffstats
path: root/dom/security/test/https-first/file_download_attribute.sjs
blob: 8941da1a410ccf05045a521f54bc376f267c4751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
  response.setHeader("Content-Disposition", "attachment; filename=some.html");
  response.setHeader("Content-Type", "text/html");
  response.write("success!");
}