Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | function handleRequest(request, response) |
michael@0 | 2 | { |
michael@0 | 3 | var match = request.queryString.match(/^state=(.*)$/); |
michael@0 | 4 | if (match) |
michael@0 | 5 | { |
michael@0 | 6 | response.setStatusLine(request.httpVersion, 204, "No content"); |
michael@0 | 7 | setState("offline.changingManifest", match[1]); |
michael@0 | 8 | } |
michael@0 | 9 | |
michael@0 | 10 | if (request.queryString == "") |
michael@0 | 11 | { |
michael@0 | 12 | response.setStatusLine(request.httpVersion, 200, "Ok"); |
michael@0 | 13 | response.setHeader("Content-Type", "text/cache-manifest"); |
michael@0 | 14 | response.setHeader("Cache-Control", "no-cache"); |
michael@0 | 15 | response.write( |
michael@0 | 16 | "CACHE MANIFEST\n" + |
michael@0 | 17 | "# v" + getState("offline.changingManifest") + "\n" + |
michael@0 | 18 | "changing1Hour.sjs\n" + |
michael@0 | 19 | "changing1Sec.sjs\n"); |
michael@0 | 20 | |
michael@0 | 21 | if (getState("offline.changingManifest") != "2") { |
michael@0 | 22 | response.write( |
michael@0 | 23 | "NETWORK:\n" + |
michael@0 | 24 | "onwhitelist.html\n"); |
michael@0 | 25 | } |
michael@0 | 26 | } |
michael@0 | 27 | } |