browser/devtools/netmonitor/test/sjs_simple-test-server.sjs
author J. Ryan Stinnett <jryans@gmail.com>
Wed, 23 Jul 2014 10:08:00 +0200
changeset 209263 bce84b70da303cbafca72e642ce3bd2890d9d328
parent 209262 00f079c876f68f618c0d79d3448c4c59430f9368
permissions -rw-r--r--
Bug 1038695 - Show all cookies in Net Monitor, not just first. r=vporof, a=sledru

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

function handleRequest(request, response) {
  response.setStatusLine(request.httpVersion, 200, "Och Aye");

  response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
  response.setHeader("Pragma", "no-cache");
  response.setHeader("Expires", "0");

  response.setHeader("Set-Cookie", "bob=true; Max-Age=10; HttpOnly", true);
  response.setHeader("Set-Cookie", "tom=cool; Max-Age=10; HttpOnly", true);

  response.setHeader("Content-Type", "text/plain; charset=utf-8", false);
  response.setHeader("Foo-Bar", "baz", false);
  response.write("Hello world!");
}