net/http.lua
changeset 7466 3b6e7ce9431f
parent 6826 3b07f38d70f5
child 7467 3b7de72e58a9
--- a/net/http.lua	Tue Jun 28 14:49:44 2016 +0100
+++ b/net/http.lua	Thu Jul 07 23:07:19 2016 +0100
@@ -27,6 +27,8 @@
 
 local requests = {}; -- Open requests
 
+local function make_id(req) return (tostring(req):match("%x+$")); end
+
 local listener = { default_port = 80, default_mode = "*a" };
 
 function listener.onconnect(conn)
@@ -125,6 +127,8 @@
 		req.path = "/";
 	end
 
+	req.id = ex and ex.id or make_id(req);
+
 	local method, headers, body;
 
 	local host, port = req.host, req.port;