Software / code / prosody
Comparison
net/httpserver.lua @ 4228:1c2daf61c348
net.httpserver: Revert commit eccd3c87d717 which has since been fixed in a better way
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 21 Mar 2011 19:35:53 +0000 |
| parent | 4196:6de69a07fbf9 |
| child | 4446:d1d4d8c8a2a9 |
| child | 4797:e239668aa6d2 |
comparison
equal
deleted
inserted
replaced
| 4227:6b83ef6ec845 | 4228:1c2daf61c348 |
|---|---|
| 134 request.url.path = request.url.path and request.url.path:gsub("%%(%x%x)", function(x) return x.char(tonumber(x, 16)) end); | 134 request.url.path = request.url.path and request.url.path:gsub("%%(%x%x)", function(x) return x.char(tonumber(x, 16)) end); |
| 135 request.body = { request.body }; | 135 request.body = { request.body }; |
| 136 call_callback(request); | 136 call_callback(request); |
| 137 end | 137 end |
| 138 local function error_cb(r) | 138 local function error_cb(r) |
| 139 log("error", "Error in HTTP server handler: %s", r or "connection-closed"); | |
| 140 call_callback(request, r or "connection-closed"); | 139 call_callback(request, r or "connection-closed"); |
| 141 destroy_request(request); | 140 destroy_request(request); |
| 142 end | 141 end |
| 143 request.parser = httpstream_new(success_cb, error_cb); | 142 request.parser = httpstream_new(success_cb, error_cb); |
| 144 end | 143 end |