# HG changeset patch # User Kim Alvefur # Date 1644021128 -3600 # Node ID c0f49a4026f8c4ef43fd856844961be6cb79f21a # Parent fe0f5c47fda3da2d3d7b469965c75b696deea15e net.http: Allow using DANE via options or per request settings Dare to enable by default? diff -r fe0f5c47fda3 -r c0f49a4026f8 net/http.lua --- a/net/http.lua Fri Feb 04 22:11:14 2022 +0100 +++ b/net/http.lua Sat Feb 05 01:32:08 2022 +0100 @@ -287,12 +287,16 @@ end local port_number = port and tonumber(port) or (using_https and 443 or 80); + local use_dane = self.options and self.options.use_dane; local sslctx = false; if using_https then sslctx = ex and ex.sslctx or self.options and self.options.sslctx; + if ex and ex.use_dane ~= nil then + use_dane = ex.use_dane; + end end - local http_service = basic_resolver.new(host, port_number, "tcp", { servername = req.host }); + local http_service = basic_resolver.new(host, port_number, "tcp", { servername = req.host; use_dane = use_dane }); connect(http_service, listener, { sslctx = sslctx }, req); self.events.fire_event("request", { http = self, request = req, url = u });