Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 function handleRequest(request, response)
7 {
8 var Etag = '"4c881ab-b03-435f0a0f9ef00"';
9 var IfNoneMatch = request.hasHeader("If-None-Match")
10 ? request.getHeader("If-None-Match")
11 : "";
13 var page = "<!DOCTYPE html><html><body><p>hello world!</p></body></html>";
15 response.setHeader("Etag", Etag, false);
17 if (IfNoneMatch == Etag) {
18 response.setStatusLine(request.httpVersion, "304", "Not Modified");
19 }
20 else {
21 response.setHeader("Content-Type", "text/html", false);
22 response.setHeader("Content-Length", page.length + "", false);
23 response.write(page);
24 }
25 }