summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/test/browser/server.sjs
blob: 283df46dcd3bf1651bf75c53d5bbfdd05e772b1a (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");
  }
}