|
List Info
Thread: pycurl initialization while offline fails
|
|
| pycurl initialization while offline
fails |

|
2006-06-25 00:20:49 |
I am running in to this exact issue:
http://www.archivesat.com/curl_with_python/thread6099
88.htm
>>> import pycurl
>>> pycurl.Curl()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
pycurl.error: initializing curl failed
>>> pycurl.version_info()
(2, '7.13.2', 462082, 'i386-pc-win32', 3740,
'OpenSSL/0.9.7g',
9465983, '1.2.2', ('ftp', 'gopher', 'telnet',
'dict', 'ldap', 'http',
'file', 'https', 'ftps'), '
1.2.2-20050411', 66050, '0.5.15')
-Greg
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-25 12:10:04 |
On Sat, 24 Jun 2006, ghazel gmail.com wrote:
> I am running in to this exact issue:
> http://www.archivesat.com/curl_with_python/thread6099
88.htm
This is a known flaw in libcurl when built with c-ares on
Windows. Nobody has
yet fixed this issue and I'm not aware of anyone actually
trying to. (It
should be fairly easy fix.)
--
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-26 17:28:47 |
I'm certainly willing to spend a little time digging in to
fixing it,
can you point me in the right direction?
-Greg
On 6/25/06, Daniel Stenberg <daniel haxx.se> wrote:
> On Sat, 24 Jun 2006, ghazel gmail.com wrote:
>
> > I am running in to this exact issue:
> > http://www.archivesat.com/curl_with_python/thread6099
88.htm
>
> This is a known flaw in libcurl when built with c-ares
on Windows. Nobody has
> yet fixed this issue and I'm not aware of anyone
actually trying to. (It
> should be fairly easy fix.)
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-26 21:55:00 |
On Mon, 26 Jun 2006, ghazel gmail.com wrote:
> I'm certainly willing to spend a little time digging
in to fixing it, can
> you point me in the right direction?
Certainly! (Cc'ing the libcurl and c-ares lists as well, so
you for you guys:
I'm replying to an original mail posted on the
curl-and-python list.)
The problem is (on Windows) that c-ares returns a failure to
init when there's
no DNS server found. Since c-ares is a DNS resolver it could
be seen like a
proper return code since it can't DNS resolve without a DNS
server. It could
however still resolve hosts using the hosts file so this
error is probably
subject to get fixed...
libcurl takes that init failure (Curl_open() in lib/url.c)
as a fatal error
and returns an error code from the the curl_easy_init()
function and no more
fun is to be had...
I believe a better way to deal with the c-ares failure is to
keep information
about this lack of currently working c-ares and retry the
init on all
subsequent requests to actually resolve host names and if it
fails again at
that point, simply act as with other resolve failures. It
should still work
fine with numerical addresses (and hosts-based names once
c-ares is fixed to
do that).
I hope this sheds some light to the problems involved.
--
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-27 07:25:24 |
I worked my way through openssl, c-ares and libcurl
compilation, but I
can't find a way to compile libidn in windows, so I can't
get pycurl
compilation started. Any advice?
-Greg
On 6/26/06, Daniel Stenberg <daniel haxx.se> wrote:
> On Mon, 26 Jun 2006, ghazel gmail.com wrote:
>
> > I'm certainly willing to spend a little time
digging in to fixing it, can
> > you point me in the right direction?
>
> Certainly! (Cc'ing the libcurl and c-ares lists as
well, so you for you guys:
> I'm replying to an original mail posted on the
curl-and-python list.)
>
> The problem is (on Windows) that c-ares returns a
failure to init when there's
> no DNS server found. Since c-ares is a DNS resolver it
could be seen like a
> proper return code since it can't DNS resolve without
a DNS server. It could
> however still resolve hosts using the hosts file so
this error is probably
> subject to get fixed...
>
> libcurl takes that init failure (Curl_open() in
lib/url.c) as a fatal error
> and returns an error code from the the curl_easy_init()
function and no more
> fun is to be had...
>
> I believe a better way to deal with the c-ares failure
is to keep information
> about this lack of currently working c-ares and retry
the init on all
> subsequent requests to actually resolve host names and
if it fails again at
> that point, simply act as with other resolve failures.
It should still work
> fine with numerical addresses (and hosts-based names
once c-ares is fixed to
> do that).
>
> I hope this sheds some light to the problems involved.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-27 07:55:39 |
On Tue, 27 Jun 2006, ghazel gmail.com wrote:
> I worked my way through openssl, c-ares and libcurl
compilation, but I can't
> find a way to compile libidn in windows, so I can't
get pycurl compilation
> started. Any advice?
The easy route would be to just skip libidn for this purpose
since it isn't
necessary to work out these things.
--
Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
| pycurl initialization while offline
fails |

|
2006-06-27 21:29:21 |
I got everything compiling (sans libidn) and it works. That
is, I
began to make the change you talked about and noticed it
didn't
exhibit the problem I mentioned originally. I believe
somewhere
between c-ares/1.2.2-20050411 and c-ares/1.3.1 the problem
has been
fixed the correct way - when offline, IPs and entries in the
host
files work as expected, and other host names fail resolution
when/as
expected.
Any chance we could get a build with the latest c-ares? I
don't know
which build system you use, but in VC I had to add
ares_getsock.c to
the areslib build process to resolve an undefined symbol.
Otherwise
everything went fine.
-Greg
On 6/27/06, Daniel Stenberg <daniel haxx.se> wrote:
> On Tue, 27 Jun 2006, ghazel gmail.com wrote:
>
> > I worked my way through openssl, c-ares and
libcurl compilation, but I can't
> > find a way to compile libidn in windows, so I
can't get pycurl compilation
> > started. Any advice?
>
> The easy route would be to just skip libidn for this
purpose since it isn't
> necessary to work out these things.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|
|
[1-7]
|
|