# HG changeset patch # User Kim Alvefur # Date 1444821659 -7200 # Node ID 5849d70bcd370f2ff25196b00f7c8c9a09c0ffdc # Parent 43fac0c2c77282b80166dfc01a925b242ffe077f mod_http_upload: Fix Content-Length header (it is now identical to the one in net.http.server) diff -r 43fac0c2c772 -r 5849d70bcd37 mod_http_upload/mod_http_upload.lua --- 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