summaryrefslogtreecommitdiffstats
path: root/toolkit/components/reader/tests/browser/getCookies.sjs
blob: 02e29fd87765070ca7dd93c86cf767880f92ce6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function handleRequest(request, response) {
  const cookies = request.hasHeader("Cookie")
    ? request.getHeader("Cookie")
    : "";
  response.write(`
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8"/>
        </head>
        <body>
            <p>Cookie: <span id="cookieSpan">${cookies}</span></p>
        </body>
    </html>
  `);
}