cURL / Mailing Lists / curl-library / Single Mail

curl-library

Networking Question : Windows vs *Unix

From: Jon Torrey <ntox101_at_gmail.com>
Date: Tue, 26 Aug 2014 09:36:50 -0400

Hey everyone,

In the past, I wrote a prototype application which makes HTTP PUT requests
on a Windows machine which communicates with an API using REST-style
commands. This application works flawlessly in the fact that it resolves
hostnames just fine.

Recently, I have written an application which uses the same code but does
not behave normally.Curl fails to resolve the hostname. However, while
debugging, I see curl calls gethostname() and gethostbyname() functions as
well as gethostbyaddr(), and I've came to the conclusion, I am almost able
to configure curl to use whichever ones I want. What is very interesting,
if I try to do a gethostbyname("google.com"), I get an IP just fine. If I
do a gethostbyname() of the URL stated below, I get jibberish output.
 NOTE: my OS does not have ares.h

Below is the output of curl. I starred out some content of the URL for
security and privacy reasons but for clarification, they are normal ASCII
a-z characters.

I/O: * Curl_ipv4_resolve_r failed for dev1.***dev.com
I/O: * Couldn't resolve host 'dev1.***dev.com'
I/O: * Closing connection 0
I/O: curl_easy_perform() failed: Couldn't resolve host name
I/O: Error Buffer = Couldn't resolve host 'dev1.***dev.com'

Thanks,
JT

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-26