net/http/server.lua
changeset 12890 686c3cdd4775
parent 12889 3a6dae39c70e
child 12978 ba409c67353b
--- a/net/http/server.lua	Fri Feb 10 00:37:05 2023 +0100
+++ b/net/http/server.lua	Thu Feb 16 16:00:07 2023 +0000
@@ -428,6 +428,10 @@
 function _M.set_option(name, value)
 	options[name] = value;
 end
+function _M.get_request_from_conn(conn)
+	local response = conn and conn._http_open_response;
+	return response and response.request or nil;
+end
 
 _M.listener = listener;
 _M.codes = codes;