cURL / Mailing Lists / curl-users / Single Mail


Re: proxy answer

From: Daniel Stenberg <>
Date: Wed, 24 Apr 2002 14:55:18 +0200 (MET DST)

On Wed, 24 Apr 2002, Sebastien WILLEMIJNS wrote:

> when i use -X option (proxy), i have sometimes
> curl: (7) Couldn't connect to host
> but i don't know if it's the proxy or it's the server of the asked URL

That's the -x option, -X is different.

When using a proxy, curl connects to that and not the remote server. So if
curl complains on connect problems, it means the proxy.

If the proxy can't connect to the remote host, that will be known to you only
by the HTTP error code and the HTML contents the proxy returns back to curl.

> can you add the host name in this famous error number 7 ? ;)

The piece of the code that finds this error has no idea of a host name, but
sure, we could make it more obvious...

    Daniel Stenberg -- curl groks URLs --
Received on 2002-04-24