# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1567296333 -7200
# Node ID 6c804b6b2ca2e57f93ca83b06f740375d72625e9
# Parent  d4390c427a6639c9137e63adf6e820f0ce20b12e
net.http: Pass server name along for SNI (fixes #1408)

net.resolver.basic passes this 'extra' field along to server.addclient

diff -r d4390c427a66 -r 6c804b6b2ca2 net/http.lua
--- 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 });