Software / code / prosody
Comparison
net/httpserver.lua @ 1661:33b1aee4b77f
net.httpserver: Don't log response bodies!
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 11 Aug 2009 19:40:38 +0100 |
| parent | 1632:4a70cbb0fad7 |
| child | 1666:d1243b321c45 |
comparison
equal
deleted
inserted
replaced
| 1660:ae2f60a20428 | 1661:33b1aee4b77f |
|---|---|
| 59 if request.method ~= "HEAD" then | 59 if request.method ~= "HEAD" then |
| 60 t_insert(resp, body); | 60 t_insert(resp, body); |
| 61 end | 61 end |
| 62 else | 62 else |
| 63 -- Response we have is just a string (the body) | 63 -- Response we have is just a string (the body) |
| 64 log("debug", "Sending response to %s: %s", request.id or "<none>", response or "<none>"); | 64 log("debug", "Sending 200 response to %s", request.id or "<none>"); |
| 65 | 65 |
| 66 resp = { "HTTP/1.0 200 OK\r\n" }; | 66 resp = { "HTTP/1.0 200 OK\r\n" }; |
| 67 t_insert(resp, "Connection: close\r\n"); | 67 t_insert(resp, "Connection: close\r\n"); |
| 68 t_insert(resp, "Content-Length: "); | 68 t_insert(resp, "Content-Length: "); |
| 69 t_insert(resp, #response); | 69 t_insert(resp, #response); |