summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/test/browser/oversize.sjs
blob: e2275d050c3ca941c5d6797c6be981213f7995ef (plain)
1
2
3
4
5
6
7
8
9
function handleRequest(aRequest, aResponse) {
  aResponse.setStatusLine(aRequest.httpVersion, 200);

  const maxBytesPerCookie = 4096;
  const maxBytesPerCookiePath = 1024;

  aResponse.setHeader("Set-Cookie", "a=" + Array(maxBytesPerCookie + 1).join('x'), true);
  aResponse.setHeader("Set-Cookie", "b=c; path=/" + Array(maxBytesPerCookiePath + 1).join('x'), true);
}