curl-users
If a given url has serveral host IP addresses, which one curl will take?
Date: Mon, 28 Sep 2015 11:45:24 +0800
Hi,
Here is my question:
If I curl a url just like this:curl http://curl.haxx.se/
<curl-users_at_cool.haxx.se>
Maybe curl will call the function gethostbyname_r(or something
related) to resovle this url, gethostbyname_r will find one or more host
IP addresses of this url.
My question is when curl get one more host IP addresses from
gethostbyname_r, which one it will take to connect?
I thought curl will traversal addresses in h_addr_list from the first
to the end, if it got a usable host IP address, it will break and do the
transfer work, if transfer work done on this usable address, curl will give
the result and exit.
Thanks!
Meng Wang.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-09-28