net.http.request() does not currently do any DNS requests itself, but simply hands the hostname to server.addclient(), which in turn hands it to luasocket which (maybe) does a blocking dns lookup.
It would in some ways be better to do async DNS lookups ourselves using net.adns.
This would also make it easier to do dualstack requests, eg happy eyeballs or at least try multiple IPs on connection errors.
net.http.request() does not currently do any DNS requests itself, but simply hands the hostname to server.addclient(), which in turn hands it to luasocket which (maybe) does a blocking dns lookup. It would in some ways be better to do async DNS lookups ourselves using net.adns. This would also make it easier to do dualstack requests, eg happy eyeballs or at least try multiple IPs on connection errors.
Fixed in https://hg.prosody.im/trunk/rev/2bd2e94a0496 Also see https://hg.prosody.im/trunk/rev/601681acea73
Changes