From 9a7f5206098e4af016abdea336b908214fc76255 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 24 Oct 2012 19:05:56 +0200 Subject: mod_s2s: Detect TLS compression --- plugins/mod_s2s/mod_s2s.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/mod_s2s/mod_s2s.lua') 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 -- cgit v1.2.3