cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1556528 ] curl hangs on few cases of socks5 connections

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 11 Sep 2006 22:51:30 -0700

Bugs item #1556528, was opened at 2006-09-11 10:06
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1556528&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: curl hangs on few cases of socks5 connections

Initial Comment:
curl hangs on few cases of socks5 connections. I use
php with libcurl 7.15.3 and I've seen this issue with
some socks servers. I wanted to make system that
tests socks5 servers with curl, however script hanged
on some socks!

I dont know socks protocol so I can say why it is
happening but here is code to recreate:

<?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,"http://google.pl");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_PROXYTYPE,
CURLPROXY_SOCKS5);
curl_setopt ($ch,
CURLOPT_PROXY, "221.208.173.84:3128");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($ch, CURLOPT_TIMEOUT, 5);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
echo "AAA";
$xyz = curl_exec ($ch);
echo "BBB";
?>

I dont know how log socks under 221.208.173.84:3128
will work as it works now. But for now it causes curl
to hang on curl_exec. Script will show AAA but will
NEVER show BBB. Script wont timeout ever, so it will
break every script.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-09-11 22:51

Message:
Logged In: NO

I've tested september 12 CVS and problem is still there,
however now it timeouts in like 2-4 minutes - you cant set
timeout. Try this one:

<?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,"http://google.pl");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_PROXYTYPE,
CURLPROXY_SOCKS5);
curl_setopt ($ch,
CURLOPT_PROXY, "202.102.239.179:1080");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($ch, CURLOPT_TIMEOUT, 5);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
echo "AAA";
$xyz = curl_exec ($ch);
echo "BBB";
?>

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-09-11 10:09

Message:
Logged In: NO

aditional comment: server under 221.208.173.84:3128 might
not be socks server at all, but this is no reason to curl
not to timeout! It will break every script that for
example want to test socks servers

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2006-09-11 10:08

Message:
Logged In: YES
user_id=1110

This is fixed in the current development version, I believe.
Try a daily snapshot or wait for the next release.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1556528&group_id=976
Received on 2006-09-12

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET