diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-28 19:36:09 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-28 19:36:09 +0100 |
commit | cc6bcc5877af74cabd0bb30122973a6ca5d19ae4 (patch) | |
tree | 5692323febe6e4198ede28e5e501eaeddf162b38 | |
parent | 99d16ae1392d520312dd3fecf642cb60abe81b0e (diff) | |
download | prosody-cc6bcc5877af74cabd0bb30122973a6ca5d19ae4.tar.gz prosody-cc6bcc5877af74cabd0bb30122973a6ca5d19ae4.zip |
net.http.server: Use response.body if it exists and body is not specified to send_response
-rw-r--r-- | net/http/server.lua | 2 |
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 }; |