Comparison

net/http.lua @ 754:01abf314fac0

Automated merge with http://waqas.ath.cx:8000/
author Matthew Wild <mwild1@gmail.com>
date Thu, 29 Jan 2009 17:54:37 +0000
parent 739:1def06cd9311
child 903:6737d005a84a
comparison
equal deleted inserted replaced
753:3a0f9cf38f99 754:01abf314fac0
132 default_headers["Content-Type"] = "application/x-www-form-urlencoded"; 132 default_headers["Content-Type"] = "application/x-www-form-urlencoded";
133 end 133 end
134 if ex.method then req.method = ex.method; end 134 if ex.method then req.method = ex.method; end
135 end 135 end
136 136
137 req.handler, req.conn = server.wraptcpclient(listener, socket.tcp(), req.host, req.port or 80, 0, "*a"); 137 req.handler, req.conn = server.wrapclient(socket.tcp(), req.host, req.port or 80, listener, "*a");
138 req.write = req.handler.write; 138 req.write = req.handler.write;
139 req.conn:settimeout(0); 139 req.conn:settimeout(0);
140 local ok, err = req.conn:connect(req.host, req.port or 80); 140 local ok, err = req.conn:connect(req.host, req.port or 80);
141 if not ok and err ~= "timeout" then 141 if not ok and err ~= "timeout" then
142 return nil, err; 142 return nil, err;