summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/test/browser/server.sjs
blob: 86835914bbb4affd8f2f36ae8dfb1d3de1a796fa (plain)
1
2
3
4
5
6
7
8
9
function handleRequest(aRequest, aResponse) {
  aResponse.setStatusLine(aRequest.httpVersion, 200);
  if (aRequest.hasHeader("Cookie")) {
    aResponse.write("cookie-present");
  } else {
    aResponse.setHeader("Set-Cookie", "foopy=1");
    aResponse.write("cookie-not-present");
  }
}