curl-library
Re: Problems with curl 7.10.1 and the multi interface
Date: Fri, 18 Oct 2002 09:25:18 +0200 (MET DST)
On Thu, 17 Oct 2002, Fabrizio Ammollo wrote:
> 1) If I try to connect to my own web server, which is not active, or to any
> other closed port, instead of failing because of "connection refused", my
> program hangs forever on the select system call.
There was a bug in the check-for-connect function that caused this and that
has been fixed in CVS:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/connect.c.diff?r1=1.38&r2=1.39
> 2) I tried connecting, as a test, to www.freshmeat.net, and I have seen
> that if I don't specify the option to follow HTTP redirects the transfer is
> considered finished but the file is empty. This is fine. But, if I specify
> to follow the redirects, the execution of the program continues until the
> max fd set by curl_multi_fdset is -1, and then (obviously) hangs.
Oh. The 7.10.1 was the first version in which the multi interface attempts to
follow locations when told, so I bet there's a bug or two in that code.
I think you'd be better off using gdb instead of strace. I would too, as
talking function names and variables' contents are easier than weird strace
outputs.
> Then, I have one doubt, too: is it correct for libcurl to "wake up" so much
> my program even if no data is really transferred ?
How do you mean? How does libcurl "wake up" ? Don't you select() on file
handles?
[snip]
> I think the reason is that the socket is checked for writing even if this
> could not be really needed.. am I right ?
If you're right, then this is a bug.
> I think it is not a good thing, because the applications are called too
> many times for no valid reason.
That's stupid, indeed.
> Another doubt, not really related to libcurl, is the following: is there a
> known reason why I am not able to strace the execution of my program when
> using https ?
Not that I know of.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-10-18