Software /
code /
prosody
Changeset
6083:31b2f82e2d3c
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 15 Apr 2014 21:54:44 +0200 |
parents | 6081:19ada596aec4 (current diff) 6082:d0e824a21861 (diff) |
children | 6088:be10c6c5aa7f |
files | |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http/server.lua Tue Apr 15 20:36:39 2014 +0200 +++ b/net/http/server.lua Tue Apr 15 21:54:44 2014 +0200 @@ -255,18 +255,17 @@ 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