# HG changeset patch # User Kim Alvefur # Date 1397591684 -7200 # Node ID 31b2f82e2d3c6f884d12f2f2962befb0a806966a # Parent 19ada596aec4b83b8278384ca51b9738d1f3a84e# Parent d0e824a21861a86ca52dda183a771104f8cccabc Merge 0.10->trunk diff -r 19ada596aec4 -r 31b2f82e2d3c net/http/server.lua --- 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