aboutsummaryrefslogtreecommitdiffstats
path: root/net/http.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-01 02:05:33 +0200
committerKim Alvefur <zash@zash.se>2019-09-01 02:05:33 +0200
commit92b963270a4e399096f66ac9353a99574915d2e7 (patch)
tree44a95212814f039d41f6e77bf824af6a6dab7c5b /net/http.lua
parentfb692a2cedc46229966f4a84585f292abe850ba4 (diff)
downloadprosody-92b963270a4e399096f66ac9353a99574915d2e7.tar.gz
prosody-92b963270a4e399096f66ac9353a99574915d2e7.zip
net.http: Pass server name along for SNI (fixes #1408)
net.resolver.basic passes this 'extra' field along to server.addclient
Diffstat (limited to 'net/http.lua')
-rw-r--r--net/http.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http.lua b/net/http.lua
index 0e03fb3a..055fc936 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -260,7 +260,7 @@ local function request(self, u, ex, callback)
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 });