Comparison

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
comparison
equal deleted inserted replaced
11061:45e1c467a3a7 11063:30d3f6f85eb8
270 local sslctx = false; 270 local sslctx = false;
271 if using_https then 271 if using_https then
272 sslctx = ex and ex.sslctx or self.options and self.options.sslctx; 272 sslctx = ex and ex.sslctx or self.options and self.options.sslctx;
273 end 273 end
274 274
275 local http_service = basic_resolver.new(host, port_number); 275 local http_service = basic_resolver.new(host, port_number, "tcp", { servername = req.host });
276 connect(http_service, listener, { sslctx = sslctx }, req); 276 connect(http_service, listener, { sslctx = sslctx }, req);
277 277
278 self.events.fire_event("request", { http = self, request = req, url = u }); 278 self.events.fire_event("request", { http = self, request = req, url = u });
279 return req; 279 return req;
280 end 280 end