diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-28 19:36:57 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-28 19:36:57 +0100 |
commit | 2f5ffa76dcb1a7a5968b8cb4d5a20041b7d81d56 (patch) | |
tree | ad21d7bcc85125b0478f61abd2ff6c77e3cdac24 /net/http | |
parent | cd8b026b999a7b7abc77f557302ac751982f6d6d (diff) | |
download | prosody-2f5ffa76dcb1a7a5968b8cb4d5a20041b7d81d56.tar.gz prosody-2f5ffa76dcb1a7a5968b8cb4d5a20041b7d81d56.zip |
net.http.server: Code cleanup/adjustment now that send_response() accepts response.body
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/server.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index e15e6e14..69908e4e 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -196,7 +196,7 @@ function handle_request(conn, request, finish_cb) local result = events.fire_event(event, payload); if result ~= nil then if result ~= true then - local body = ""; + local body; local result_type = type(result); if result_type == "number" then response.status_code = result; @@ -206,8 +206,6 @@ function handle_request(conn, request, finish_cb) elseif result_type == "string" then body = result; elseif result_type == "table" then - body = result.body; - result.body = nil; for k, v in pairs(result) do response[k] = v; end |