Skip to content
Snippets Groups Projects
Commit f90e0d40 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Fixes [bug 2563] by not sending a third argument to Stdio.File->connect()....

Fixes [bug 2563] by not sending a third argument to Stdio.File->connect(). Connect no longer catches thrown errors. Should now compile without SSL installed.

Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.38
parent ff076f22
No related branches found
No related tags found
No related merge requests found
......@@ -30,8 +30,8 @@ int timeout=120; // seconds
#if constant(SSL.sslfile)
import SSL.constants;
SSL.sslfile ssl;
int https=0;
#endif
int(0..1) https = 0;
object con;
string request;
......@@ -109,18 +109,23 @@ static void connect(string server,int port,int blocking)
#ifdef HTTP_QUERY_DEBUG
werror("<- (connect %O:%d)\n",server,port);
#endif
int success;
if (catch { success = con->connect(server,port,blocking); } || !success)
{
if (!(errno=con->errno())) errno=22; /* EINVAL */
if(con->_fd)
success = con->connect(server, port);
else
success = con->connect(server, port, blocking);
if(!success) {
#ifdef HTTP_QUERY_DEBUG
werror("<- (error %d)\n",errno);
werror("<- (connect error)\n");
#endif
destruct(con);
con = 0;
ok = 0;
return;
}
#ifdef HTTP_QUERY_DEBUG
werror("<- %O\n",request);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment