aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/server.lua')
-rw-r--r--net/http/server.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 43e6bc9f..f2d0ab10 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -1,19 +1,19 @@
local t_insert, t_concat = table.insert, table.concat;
-local parser_new = require "net.http.parser".new;
-local events = require "util.events".new();
-local addserver = require "net.server".addserver;
-local log = require "util.logger".init("http.server");
+local parser_new = require "prosody.net.http.parser".new;
+local events = require "prosody.util.events".new();
+local addserver = require "prosody.net.server".addserver;
+local log = require "prosody.util.logger".init("http.server");
local os_date = os.date;
local pairs = pairs;
local s_upper = string.upper;
local setmetatable = setmetatable;
-local cache = require "util.cache";
-local codes = require "net.http.codes";
-local promise = require "util.promise";
-local errors = require "util.error";
+local cache = require "prosody.util.cache";
+local codes = require "prosody.net.http.codes";
+local promise = require "prosody.util.promise";
+local errors = require "prosody.util.error";
local blocksize = 2^16;
-local async = require "util.async";
+local async = require "prosody.util.async";
local _M = {};
@@ -378,11 +378,11 @@ function _M.send_file(response, f)
response.conn:write(chunk);
else
incomplete[response.conn] = nil;
+ if f.close then f:close(); end
if chunked then
response.conn:write("0\r\n\r\n");
end
-- io.write("\n");
- if f.close then f:close(); end
return response:done();
end
end