diff options
-rw-r--r-- | net/http/server.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index bc655ab1..e15165c2 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -428,6 +428,10 @@ end 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; |