blob: 452cb77f941deaa1d9b428c4c89e78b3b846d925 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function handleRequest(aRequest, aResponse) {
var url = aRequest.queryString.match(/\burl=([^#&]*)/);
if (!url) {
aResponse.setStatusLine(aRequest.httpVersion, 404, "Not Found");
return;
}
url = decodeURIComponent(url[1]);
aResponse.setStatusLine(aRequest.httpVersion, 302, "Found");
aResponse.setHeader("Cache-Control", "no-cache", false);
aResponse.setHeader("Location", url, false);
}
|