aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-28 19:36:09 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-28 19:36:09 +0100
commitcc6bcc5877af74cabd0bb30122973a6ca5d19ae4 (patch)
tree5692323febe6e4198ede28e5e501eaeddf162b38 /net
parent99d16ae1392d520312dd3fecf642cb60abe81b0e (diff)
downloadprosody-cc6bcc5877af74cabd0bb30122973a6ca5d19ae4.tar.gz
prosody-cc6bcc5877af74cabd0bb30122973a6ca5d19ae4.zip
net.http.server: Use response.body if it exists and body is not specified to send_response
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 295592d3..e15e6e14 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -228,7 +228,7 @@ function _M.send_response(response, body)
local status_line = "HTTP/"..response.request.httpversion.." "..(response.status or codes[response.status_code]);
local headers = response.headers;
- body = body or "";
+ body = body or response.body or "";
headers.content_length = #body;
local output = { status_line };