On 22.11.21 21:33, Timothe Litt via curl-library wrote:

Why not just put the entries you need into hosts.txt ( Actually /etc/hosts or \Windows\System32\drivers\etc\hosts, or equivalent)?

Because I don't know the host names beforehand.

Even embedded OSs support this, and the convention is to look there before consulting DNS.  This happens behind the system calls that do name resolution, so it's transparent to cURL - and anything else.  For GNU systems, this is in glibc (and see /etc/nsswitch.conf for resolution order).  Let the OS do its job, don't re-invent the wheel.

This supports all the use cases for all applications.

Building something custom into cURL only gets you cURL - and when you want to do something else (notify someone via mail, or SMS,  or ...) you're back to either doing it via cURL, or trying to force your own name resolution into the next application.

I only want curl. Maybe I wasn't clear enough.
The device has *no* internet access at all. The only way to connect to the internet is through this application. Linux doesn't own or handle the device.


- Marcel
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to