summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/test/header_checker.sjs
blob: 70610410396e310aad452a33cc9848d246ad1984 (plain)
1
2
3
4
5
6
7
8
9
function handleRequest(request, response) {
  if (request.getHeader("Service-Worker") === "script") {
    response.setStatusLine("1.1", 200, "OK");
    response.setHeader("Content-Type", "text/javascript");
    response.write("// empty");
  } else {
    response.setStatusLine("1.1", 404, "Not Found");
  }
}