Skip to content
Snippets Groups Projects
Commit ebc613ab authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

bugfix

Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.3
parent eeb77712
No related branches found
No related tags found
No related merge requests found
...@@ -259,6 +259,7 @@ void async_got_host(string server,int port) ...@@ -259,6 +259,7 @@ void async_got_host(string server,int port)
} }
con->set_nonblocking(0,async_connected,async_failed); con->set_nonblocking(0,async_connected,async_failed);
// werror(server+"\n"); // werror(server+"\n");
if (catch { con->connect(server,port); }) if (catch { con->connect(server,port); })
...@@ -319,7 +320,7 @@ void dns_lookup_async(string hostname,function callback,mixed ...extra) ...@@ -319,7 +320,7 @@ void dns_lookup_async(string hostname,function callback,mixed ...extra)
call_out(callback,0,0,@extra); // can't lookup that... call_out(callback,0,0,@extra); // can't lookup that...
return; return;
} }
sscanf(hostname,"%*[0-9.]",id); sscanf(hostname,"%[0-9.]",id);
if (hostname==id || if (hostname==id ||
(id=hostname_cache[hostname])) (id=hostname_cache[hostname]))
{ {
...@@ -438,8 +439,6 @@ object async_request(string server,int port,string query, ...@@ -438,8 +439,6 @@ object async_request(string server,int port,string query,
call_out(async_timeout,timeout); call_out(async_timeout,timeout);
dns_lookup_async(server,async_got_host,port);
// prepare the request // prepare the request
if (!data) data=""; if (!data) data="";
...@@ -457,6 +456,8 @@ object async_request(string server,int port,string query, ...@@ -457,6 +456,8 @@ object async_request(string server,int port,string query,
request=query+"\r\n"+headers+"\r\n"+data; request=query+"\r\n"+headers+"\r\n"+data;
dns_lookup_async(server,async_got_host,port);
return this_object(); return this_object();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment