diff options
author | Marius <mariausol@gmail.com> | 2012-08-09 01:00:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-08-09 01:00:13 +0300 |
commit | 343077218254bccdd7e518c5cc74d473d0bbf605 (patch) | |
tree | b3b58ac303f7513cb39e1695fb8f29e8fd960519 /scripts/context/lua/mtx-server.lua | |
parent | e3f2891a6167e2efe5b9cee3b374eec103cbb526 (diff) | |
download | context-343077218254bccdd7e518c5cc74d473d0bbf605.tar.gz |
beta 2012.08.08 23:45
Diffstat (limited to 'scripts/context/lua/mtx-server.lua')
-rw-r--r-- | scripts/context/lua/mtx-server.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-server.lua b/scripts/context/lua/mtx-server.lua index 1a688fb5d..a3771ed5a 100644 --- a/scripts/context/lua/mtx-server.lua +++ b/scripts/context/lua/mtx-server.lua @@ -30,7 +30,7 @@ dofile(resolvers.findfile("l-url.lua","tex")) dofile(resolvers.findfile("luat-soc.lua","tex")) local socket = socket or require("socket") -local http = socket or require("socket.http") -- not needed +local http = http or require("socket.http") -- not needed local format = string.format -- The following two lists are taken from webrick (ruby) and @@ -242,7 +242,7 @@ function handlers.lua(client,configuration,filename,suffix,iscontent,hashed) -- local action = handlers[suffix] or handlers.generic action(client,configuration,result.content,suffix,true) -- content elseif result.filename then - local suffix = file.extname(result.filename) or "text/html" + local suffix = file.suffix(result.filename) or "text/html" local action = handlers[suffix] or handlers.generic action(client,configuration,result.filename,suffix,false) -- filename else @@ -334,7 +334,7 @@ function scripts.webserver.run(configuration) filename = configuration.index report("invalid filename, forcing: %s",filename) end - local suffix = file.extname(filename) + local suffix = file.suffix(filename) local action = handlers[suffix] or handlers.generic if action then report("performing action: %s",filename) |