Software /
code /
prosody
Comparison
net/httpserver.lua @ 1052:a3429542631d
net.httpserver: Don't log the response body (can be binary data...)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Apr 2009 21:04:07 +0100 |
parent | 958:172fb9a73017 |
child | 1053:c04b40a0740b |
comparison
equal
deleted
inserted
replaced
1051:0327c569eb1a | 1052:a3429542631d |
---|---|
28 | 28 |
29 local function send_response(request, response) | 29 local function send_response(request, response) |
30 -- Write status line | 30 -- Write status line |
31 local resp; | 31 local resp; |
32 if response.body then | 32 if response.body then |
33 log("debug", "Sending response to %s: %s", request.id, response.body); | 33 log("debug", "Sending response to %s", request.id); |
34 resp = { "HTTP/1.0 ", response.status or "200 OK", "\r\n"}; | 34 resp = { "HTTP/1.0 ", response.status or "200 OK", "\r\n"}; |
35 local h = response.headers; | 35 local h = response.headers; |
36 if h then | 36 if h then |
37 for k, v in pairs(h) do | 37 for k, v in pairs(h) do |
38 t_insert(resp, k); | 38 t_insert(resp, k); |