diff options
author | Kim Alvefur <zash@zash.se> | 2014-04-15 21:54:44 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-04-15 21:54:44 +0200 |
commit | 84a60172446e16818f990a3066d38fc08acbc27c (patch) | |
tree | 072dbef45243ae261539510fcd02be042bee6ccc /net/http/server.lua | |
parent | 7b9657d41a814cadd72d44cba90c00e62d7952ef (diff) | |
parent | 0f866905fd96f816b383457792f484f403709453 (diff) | |
download | prosody-84a60172446e16818f990a3066d38fc08acbc27c.tar.gz prosody-84a60172446e16818f990a3066d38fc08acbc27c.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/http/server.lua')
-rw-r--r-- | net/http/server.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index 25fce43f..510b77fb 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -255,18 +255,17 @@ local function prepare_header(response) t_insert(output, headerfix[k]..v); end t_insert(output, "\r\n\r\n"); - t_insert(output, body); return output; end _M.prepare_header = prepare_header; function _M.send_response(response, body) if response.finished then return; end body = body or response.body or ""; - headers.content_length = #body; - local output = prepare_header(respone); + response.headers.content_length = #body; + local output = prepare_header(response); t_insert(output, body); response.conn:write(t_concat(output)); - response:finish(); + response:done(); end function _M.finish_response(response) if response.finished then return; end |