blob: 98f9aed4d03f430507a2e447aa9ac5a14d7515e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Redirect a request for an icon to a different place, using a different
* content-type.
*/
function handleRequest(request, response) {
response.setStatusLine("1.1", 302, "Moved");
if (request.queryString == "type=invalid") {
response.setHeader("Content-Type", "image/png", false);
response.setHeader("Location", "/head_search.js", false);
} else {
response.setHeader("Content-Type", "text/html", false);
response.setHeader("Location", "remoteIcon.ico", false);
}
}
|