net/http/server.lua
changeset 12890 686c3cdd4775
parent 12889 3a6dae39c70e
child 12978 ba409c67353b
equal deleted inserted replaced
12888:f5a75aaa8a25 12890:686c3cdd4775
   426 	return events.fire_event(event, ...);
   426 	return events.fire_event(event, ...);
   427 end
   427 end
   428 function _M.set_option(name, value)
   428 function _M.set_option(name, value)
   429 	options[name] = value;
   429 	options[name] = value;
   430 end
   430 end
       
   431 function _M.get_request_from_conn(conn)
       
   432 	local response = conn and conn._http_open_response;
       
   433 	return response and response.request or nil;
       
   434 end
   431 
   435 
   432 _M.listener = listener;
   436 _M.listener = listener;
   433 _M.codes = codes;
   437 _M.codes = codes;
   434 _M._events = events;
   438 _M._events = events;
   435 return _M;
   439 return _M;