mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
16 lines
520 B
Plaintext
16 lines
520 B
Plaintext
|
function handleRequest(request, response)
|
||
|
{
|
||
|
var file;
|
||
|
getObjectState("SERVER_ROOT", function(serverRoot)
|
||
|
{
|
||
|
var ref = request.getHeader("Referer");
|
||
|
// 8 is "https://".length which is the longest string before the host.
|
||
|
var pathStart = ref.indexOf("/", 8) + 1;
|
||
|
var pathEnd = ref.lastIndexOf("/") + 1;
|
||
|
file = serverRoot.getFile(ref.substring(pathStart, pathEnd) + "x");
|
||
|
});
|
||
|
|
||
|
response.setHeader("Content-Type", "text/plain", false);
|
||
|
response.write(file.path.substr(0, file.path.length-1));
|
||
|
}
|