diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-04-02 17:41:38 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-04-02 17:41:38 +0100 |
commit | 27b4049481f29dcac2d6093c40ad7e8bf1ea8899 (patch) | |
tree | 39ca42dddf3935546a0c3c37b2e2456a554899f1 /net/http/server.lua | |
parent | ae885de6a2f36eacd6085e7582e5019882208d23 (diff) | |
parent | 8c0d996be4f47b77a02668474d3d8a0a41bd0f98 (diff) | |
download | prosody-27b4049481f29dcac2d6093c40ad7e8bf1ea8899.tar.gz prosody-27b4049481f29dcac2d6093c40ad7e8bf1ea8899.zip |
Merge 0.9->0.10
Diffstat (limited to 'net/http/server.lua')
-rw-r--r-- | net/http/server.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index 0f379e96..5961169f 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -204,7 +204,7 @@ function handle_request(conn, request, finish_cb) err_code, err = 400, "Missing or invalid 'Host' header"; end end - + if err then response.status_code = err_code; response:send(events.fire_event("http-error", { code = err_code, message = err })); @@ -250,7 +250,7 @@ function _M.send_response(response, body) if response.finished then return; end response.finished = true; response.conn._http_open_response = nil; - + local status_line = "HTTP/"..response.request.httpversion.." "..(response.status or codes[response.status_code]); local headers = response.headers; body = body or response.body or ""; |