aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 4ebf96a1..43e6bc9f 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;