Diff

net/http.lua @ 10235:6c804b6b2ca2

net.http: Pass server name along for SNI (fixes #1408) net.resolver.basic passes this 'extra' field along to server.addclient
author Kim Alvefur <zash@zash.se>
date Sun, 01 Sep 2019 02:05:33 +0200
parent 10112:b327f2870382
child 10464:8d3acf16c404
line wrap: on
line diff
--- a/net/http.lua	Sun Sep 01 01:58:38 2019 +0200
+++ b/net/http.lua	Sun Sep 01 02:05:33 2019 +0200
@@ -260,7 +260,7 @@
 		sslctx = ex and ex.sslctx or self.options and self.options.sslctx;
 	end
 
-	local http_service = basic_resolver.new(host, port_number);
+	local http_service = basic_resolver.new(host, port_number, "tcp", { servername = req.host });
 	connect(http_service, listener, { sslctx = sslctx }, req);
 
 	self.events.fire_event("request", { http = self, request = req, url = u });