Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
10234:d4390c427a66 | 10235:6c804b6b2ca2 |
---|---|
258 local sslctx = false; | 258 local sslctx = false; |
259 if using_https then | 259 if using_https then |
260 sslctx = ex and ex.sslctx or self.options and self.options.sslctx; | 260 sslctx = ex and ex.sslctx or self.options and self.options.sslctx; |
261 end | 261 end |
262 | 262 |
263 local http_service = basic_resolver.new(host, port_number); | 263 local http_service = basic_resolver.new(host, port_number, "tcp", { servername = req.host }); |
264 connect(http_service, listener, { sslctx = sslctx }, req); | 264 connect(http_service, listener, { sslctx = sslctx }, req); |
265 | 265 |
266 self.events.fire_event("request", { http = self, request = req, url = u }); | 266 self.events.fire_event("request", { http = self, request = req, url = u }); |
267 return req; | 267 return req; |
268 end | 268 end |