curl-library
Re: CURLE_COULDNT_RESOLVE_HOST using libcurl easy interface
Date: Thu, 20 Dec 2012 15:56:12 +0100
Hi Dave,
Am 19.12.2012 22:10, schrieb Dave Galloway:
>> The code below appears to work fine on Windows, I get the files I
>> need. On Linux I am getting CURLE_COULDNT_RESOLVE_HOST. Using curl
>> from the command line I can get the files in Linux and Windows, I
>> can ping google.com, etc. from the command line in Linux and
>> Windows.
google.com is probably a bad sample since it resolves to multiple IPs,
and different OSes might handle this differently;
f.e. if I run 'resolveip google.com' on my Linux box I get:
resolveip google.com
IP address of google.com is 173.194.70.113
IP address of google.com is 173.194.70.102
IP address of google.com is 173.194.70.101
IP address of google.com is 173.194.70.100
IP address of google.com is 173.194.70.139
IP address of google.com is 173.194.70.138
if I try same with a small C# Windows app [1] I get:
resolveip.exe google.com
IP address of google.com is 173.194.70.101
IP address of google.com is 173.194.70.100
IP address of google.com is 173.194.70.102
IP address of google.com is 173.194.70.138
IP address of google.com is 173.194.70.113
IP address of google.com is 173.194.70.139
as you can see the order is different, and I guess this might already
cause different results ...
[1] attached - you can compile it on Windows in a cmd box with:
csc.bat resolveip.cs
Gün.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/octet-stream attachment: cs_resolveip.7z