Comparison

net/httpserver.lua @ 2275:dd344b94d088

net.httpserver: Fix to work with new server API
author Matthew Wild <mwild1@gmail.com>
date Wed, 02 Dec 2009 18:03:10 +0000
parent 2274:6241da17f48d
child 2321:7e7484a4e821
comparison
equal deleted inserted replaced
2274:6241da17f48d 2275:dd344b94d088
214 214
215 215
216 function new_request(handler) 216 function new_request(handler)
217 return { handler = handler, conn = handler.socket, 217 return { handler = handler, conn = handler.socket,
218 write = function (...) return handler:write(...); end, state = "request", 218 write = function (...) return handler:write(...); end, state = "request",
219 server = http_servers[handler.serverport()], 219 server = http_servers[handler:serverport()],
220 send = send_response, 220 send = send_response,
221 destroy = destroy_request, 221 destroy = destroy_request,
222 id = tostring{}:match("%x+$") 222 id = tostring{}:match("%x+$")
223 }; 223 };
224 end 224 end