mod_http_upload: Fix Content-Length header (it is now identical to the one in net.http.server)
--- a/mod_http_upload/mod_http_upload.lua Tue Oct 13 20:21:11 2015 +0200
+++ b/mod_http_upload/mod_http_upload.lua Wed Oct 14 13:20:59 2015 +0200
@@ -114,9 +114,9 @@
local serve_uploaded_files = module:depends("http_files").serve(storage_path);
local http_server = require"net.http.server";
-local function size_only(response, data)
- if data then
- response.headers.content_size = #data;
+local function size_only(response, body)
+ if body then
+ response.headers.content_length = #body;
end
return http_server.send_response(response);
end