Software /
code /
prosody
Changeset
4787:1d753fecf95b
net.http.server: Use response.body if it exists and body is not specified to send_response
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 28 Apr 2012 19:36:09 +0100 |
parents | 4786:ad6d4ab40b20 |
children | 4788:e14f5a156571 |
files | net/http/server.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http/server.lua Sat Apr 28 18:45:04 2012 +0100 +++ b/net/http/server.lua Sat Apr 28 19:36:09 2012 +0100 @@ -228,7 +228,7 @@ 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 };