cURL / Mailing Lists / curl-library / Single Mail


Re: Can't connect: how to find out why ?

From: Daniel Stenberg <>
Date: Tue, 8 Oct 2002 17:34:38 +0200 (MET DST)

On Tue, 8 Oct 2002, Vincent Penquerc'h wrote:

> Hi,
> I've made some code using libcurl, and that works fine at home (Linux
> 2.2.10, Apache). However, when compiled on Win32 (Cygwin), it doesn't. It
> can't connect to the outside world, though curl itself can without problem
> (and without any switches).

What libcurl version?

> It just says:
> About to connect() to
> Closing connection #0
> Error opening
> I would like to know what I can do to get more information on
> what is actually failing.

Me too. But recent libcurl versions should not be able to return back without
setting a proper error description, including at least some info to what

VERBOSE to 1 is the only available extra info here. Ah, no, you should use
CURLOPT_ERRORBUFFER to get the error text as well, it'll probably tell you

I guess you can also set a break-point in Curl_connecthost() and single-step
forward until it fails to figure it out, and also figure out why no error is

> code=curl_easy_setopt(data->handle,CURLOPT_BUFFERSIZE,block_size);

Are you sure you want to limit the read buffer size like this?

 Daniel Stenberg -- curl related mails on curl related mailing lists please
This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Received on 2002-10-08