summaryrefslogtreecommitdiffstats
path: root/toolkit/components/antitracking/test/browser/redirect.sjs
blob: 4645aedca58b8299a205915944a00319500a07b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
function handleRequest(aRequest, aResponse) {
  aResponse.setStatusLine(aRequest.httpVersion, 302);

  let query = aRequest.queryString;
  let locations = query.split("|");
  let nextLocation = locations.shift();
  if (locations.length) {
    nextLocation += "?" + locations.join("|");
  }
  aResponse.setHeader("Location", nextLocation);
}