curl-users
Re: How to disable name lookup for a given request?
Date: Thu, 6 Oct 2005 10:32:16 +0200 (CEST)
On Wed, 5 Oct 2005, A. Zatoon wrote:
> I wanted to disable the name resolution, so I wrote the IP address of the
> web server in the curl command. However, when I output the
> %{time_namelookup} variable, its value is not zero.
Did you read the man page explanation for 'time_namelookup' ?
The time, in seconds, it took from the start until the name resolving was
completed.
It simply cannot be zero to follow this.
> Any suggestion on how to disable the namelookup part?
Using the IP-only address disables the name lookup. You could easily verify
this by snooping on the network when you invoke curl, and you shall see that
there is no DNS traffic happening.
This topic reminded me of a document I write this summer that I've forgotten
about, which explains the timings libcurl reports (which are pretty
straight-forward translated to single -w variables):
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-10-06