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.
michael@0 | 1 | function handleRequest(request, response) |
michael@0 | 2 | { |
michael@0 | 3 | var file; |
michael@0 | 4 | getObjectState("SERVER_ROOT", function(serverRoot) |
michael@0 | 5 | { |
michael@0 | 6 | var ref = request.getHeader("Referer").split("?")[0]; |
michael@0 | 7 | // 8 is "https://".length which is the longest string before the host. |
michael@0 | 8 | var pathStart = ref.indexOf("/", 8) + 1; |
michael@0 | 9 | var pathEnd = ref.lastIndexOf("/") + 1; |
michael@0 | 10 | file = serverRoot.getFile(ref.substring(pathStart, pathEnd) + "x"); |
michael@0 | 11 | }); |
michael@0 | 12 | |
michael@0 | 13 | response.setHeader("Content-Type", "text/plain", false); |
michael@0 | 14 | response.write(file.path.substr(0, file.path.length-1)); |
michael@0 | 15 | } |