# HG changeset patch # User Kim Alvefur # Date 1351098356 -7200 # Node ID b22d24b5a89a0aec62f50d5d9a5534ee347999e0 # Parent b4b302fe415c4eba99d0b365e93f1b1929389ac9 mod_s2s: Detect TLS compression diff -r b4b302fe415c -r b22d24b5a89a plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Sun Oct 14 21:04:46 2012 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Wed Oct 24 19:05:56 2012 +0200 @@ -184,6 +184,14 @@ -- 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