Diff

net/http.lua @ 11063:30d3f6f85eb8 0.11

net.server: Backport client parts of SNI support from trunk (#409) Partial backports of the following commits from trunk: 6c804b6b2ca2 net.http: Pass server name along for SNI (fixes #1408) 75d2874502c3 net.server_select: SNI support (#409) 9a905888b96c net.server_event: Add SNI support (#409) adc0672b700e net.server_epoll: Add support for SNI (#409) d4390c427a66 net.server: Handle server name (SNI) as extra argument
author Kim Alvefur <zash@zash.se>
date Mon, 17 Aug 2020 23:01:14 +0200
parent 11016:5176d9f727f6
child 11067:f2ffc16a9669
line wrap: on
line diff
--- a/net/http.lua	Wed Sep 09 10:23:32 2020 +0100
+++ b/net/http.lua	Mon Aug 17 23:01:14 2020 +0200
@@ -272,7 +272,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 });