summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/context/lua/mtx-server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/context/lua/mtx-server.lua')
-rw-r--r--Master/texmf-dist/scripts/context/lua/mtx-server.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-server.lua b/Master/texmf-dist/scripts/context/lua/mtx-server.lua
index 5ec15de708f..5466bfe80a2 100644
--- a/Master/texmf-dist/scripts/context/lua/mtx-server.lua
+++ b/Master/texmf-dist/scripts/context/lua/mtx-server.lua
@@ -43,7 +43,7 @@ scripts.webserver = scripts.webserver or { }
dofile(resolvers.findfile("luat-soc.lua","tex"))
local socket = socket or require("socket")
-local http = http or require("socket.http") -- not needed
+----- http = http or require("socket.http") -- not needed
local format = string.format
-- The following two lists are taken from webrick (ruby) and
@@ -197,6 +197,7 @@ function handlers.generic(client,configuration,data,suffix,iscontent)
client:send("Connection: close\r\n")
client:send(format("Content-Length: %s\r\n",#data))
client:send(format("Content-Type: %s\r\n",(suffix and mimetypes[suffix]) or "text/html"))
+ client:send("Cache-Control: no-cache, no-store, must-revalidate, max-age=0\r\n")
client:send("\r\n")
client:send(data)
client:send("\r\n")
@@ -333,8 +334,9 @@ function scripts.webserver.run(configuration)
report("no url")
errormessage(client,configuration,404)
else
+ fullurl = url.unescapeget(fullurl)
report("requested url: %s",fullurl)
- fullurl = socket.url.unescape(fullurl) -- still needed?
+ -- fullurl = socket.url.unescape(fullurl) -- happens later
local hashed = url.hashed(fullurl)
local query = url.query(hashed.query)
local filename = hashed.path -- hm, not query?