Software / code / prosody
Comparison
net/httpserver.lua @ 958:172fb9a73017
net.httpserver: Don't log that a request has been left open if it is destroyed
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 05 Apr 2009 19:42:56 +0100 |
| parent | 697:8ddc85fa7602 |
| child | 1038:90f663769b75 |
| child | 1052:a3429542631d |
comparison
equal
deleted
inserted
replaced
| 957:34f8cda285c4 | 958:172fb9a73017 |
|---|---|
| 94 return; | 94 return; |
| 95 end | 95 end |
| 96 | 96 |
| 97 local response = callback(request.method, request.body and t_concat(request.body), request); | 97 local response = callback(request.method, request.body and t_concat(request.body), request); |
| 98 if response then | 98 if response then |
| 99 if response == true then | 99 if response == true and not request.destroyed then |
| 100 -- Keep connection open, we will reply later | 100 -- Keep connection open, we will reply later |
| 101 log("warn", "Request %s left open, on_destroy is %s", request.id, tostring(request.on_destroy)); | 101 log("warn", "Request %s left open, on_destroy is %s", request.id, tostring(request.on_destroy)); |
| 102 else | 102 else |
| 103 -- Assume response | 103 -- Assume response |
| 104 send_response(request, response); | 104 send_response(request, response); |