cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Hostname could not be resolved by DNS

From: Michael Ludwig <mlu_at_as-guides.com>
Date: Wed, 24 Sep 2008 19:24:51 +0200

Wurtz, Frederick (GE, Research, consultant) schrieb:
> Hi. I'm doing a "curl http://<full domain hostname
> designation>/cgi-bin/<some cgi script>" and getting a "404 Not Found"
> response and a page that includes 'Your requested host "<that host I
> tried to hit>" could not be resolved by DNS. (0204000057)'. So, curl
> requires I use only the actual IP address and not the hostname? Is
> that true or is this some known bug in curl?

Neither is true. My guess is your request is routed via a proxy server
that supplies this friendly response page. If your request weren't
rerouted, you'd see something like this:

milu_at_lobster:~ > curl -v www.aslkjdfls.de
* getaddrinfo(3) failed for www.aslkjdfls.de:80
* Couldn't resolve host 'www.aslkjdfls.de'
* Closing connection #0
curl: (6) Couldn't resolve host 'www.aslkjdfls.de'

Or like this:

C:\Dokumente und Einstellungen\MiLu>curl -v www.alskjdfl.de
* Could not resolve host: www.alskjdfl.de; Host not found
* Closing connection #0
curl: (6) Could not resolve host: www.alskjdfl.de; Host not found

Michael Ludwig
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-09-24