summaryrefslogtreecommitdiffstats
path: root/dom/security/test/general/file_gpc_server.sjs
blob: d0b14215b45edf2f530d810330e1fb4ecdb3220e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"use strict";

function handleRequest(request, response) {
  response.setHeader("Content-Type", "text/html", false);
  response.setHeader("Cache-Control", "no-cache", false);

  var gpc = request.hasHeader("Sec-GPC") ? request.getHeader("Sec-GPC") : "";

  if (gpc === "1") {
    response.write("true");
  } else {
    response.write("false");
  }
}