13 local requests = {}; -- Open requests |
13 local requests = {}; -- Open requests |
14 local buffers = {}; -- Buffers of partial lines |
14 local buffers = {}; -- Buffers of partial lines |
15 |
15 |
16 local httpclient = { default_port = 80, default_mode = "*a" }; |
16 local httpclient = { default_port = 80, default_mode = "*a" }; |
17 |
17 |
18 function httpclient.listener(conn, data) |
18 function httpclient.onincoming(conn, data) |
19 local request = requests[conn]; |
19 local request = requests[conn]; |
20 |
20 |
21 if not request then |
21 if not request then |
22 log("warn", "Received response from connection %s with no request attached!", tostring(conn)); |
22 log("warn", "Received response from connection %s with no request attached!", tostring(conn)); |
23 return; |
23 return; |