Changeset

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
parents 10234:d4390c427a66
children 10237:a36af4570b39
files net/http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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 });