aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-01 01:58:38 +0200
committerKim Alvefur <zash@zash.se>2019-09-01 01:58:38 +0200
commit61dd9fbc74ceb1399473a82d0397e9ad2326703b (patch)
tree3a720d3bef1fa783f79dc4fa935a2b7b399da489 /net/server_epoll.lua
parent9a6332e037265977a9ba8075ede746af0ab32961 (diff)
downloadprosody-61dd9fbc74ceb1399473a82d0397e9ad2326703b.tar.gz
prosody-61dd9fbc74ceb1399473a82d0397e9ad2326703b.zip
net.server: Handle server name (SNI) as extra argument
Code added in 75d2874502c3, 9a905888b96c and adc0672b700e uses this field. See #409 and #1408
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 96e7b201..f48086e3 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -575,6 +575,12 @@ local function wrapsocket(client, server, read_size, listeners, tls_ctx, extra)
extra = extra;
}, interface_mt);
+ if extra then
+ if extra.servername then
+ conn.servername = extra.servername;
+ end
+ end
+
conn:updatenames();
return conn;
end