aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-10-24 19:05:56 +0200
committerKim Alvefur <zash@zash.se>2012-10-24 19:05:56 +0200
commit9a7f5206098e4af016abdea336b908214fc76255 (patch)
tree2d93f16e8d107baedd6226f11434a1ecc852b9c7 /plugins
parent1dad7f3278cab2865dbfe0719b5b3daff853e2c2 (diff)
downloadprosody-9a7f5206098e4af016abdea336b908214fc76255.tar.gz
prosody-9a7f5206098e4af016abdea336b908214fc76255.zip
mod_s2s: Detect TLS compression
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 65379f5b..098a74bd 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -184,6 +184,14 @@ function stream_callbacks.streamopened(session, attr)
-- TODO: Rename session.secure to session.encrypted
if session.secure == false then
session.secure = true;
+
+ -- Check if TLS compression is used
+ local sock = session.conn:socket();
+ if sock.info then
+ session.compressed = sock:info"compression";
+ elseif sock.compression then
+ session.compressed = sock:compression(); --COMPAT mw/luasec-hg
+ end
end
if session.direction == "incoming" then