branch | 0.12 |
changeset 12889 | 3a6dae39c70e |
parent 12835 | 1cdaf21584da |
child 12890 | 686c3cdd4775 |
--- a/net/http/server.lua Thu Feb 09 22:57:32 2023 +0000 +++ b/net/http/server.lua Thu Feb 16 15:59:26 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;