summaryrefslogtreecommitdiffstats
path: root/comm/mail/test/browser/content-policy/html/401.sjs
blob: 93757fe5a5fa91da92897845e2ce44b859a6d13c (plain)
1
2
3
4
5
6
7
8
9
10
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at http://mozilla.org/MPL/2.0/. */

function handleRequest(request, response) {
  if (!request.hasHeader("Authorization")) {
    response.setStatusLine("1.1", 401, "Unauthorized");
    response.setHeader("WWW-Authenticate", `Basic realm="401test"`);
  }
}