aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorDaurnimator <quae@daurnimator.com>2014-04-15 14:51:49 -0400
committerDaurnimator <quae@daurnimator.com>2014-04-15 14:51:49 -0400
commitb31e782722274399d05eabd66eb2dd014b45bed3 (patch)
treeff42ccf21a607f45aed0c953b937704e77c83643 /net/http
parentc8e173e9c9c639cca54c25f3707de3b9ff58c788 (diff)
downloadprosody-b31e782722274399d05eabd66eb2dd014b45bed3.tar.gz
prosody-b31e782722274399d05eabd66eb2dd014b45bed3.zip
net.http.server: Fix some typos introduced in 420c0d3b8583.
Diffstat (limited to 'net/http')
-rw-r--r--net/http/server.lua7
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