Software /
code /
prosody
Changeset
5173:b22d24b5a89a
mod_s2s: Detect TLS compression
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 24 Oct 2012 19:05:56 +0200 |
parents | 5171:b4b302fe415c |
children | 5174:42765c80244c 5175:fabaed7418a6 |
files | plugins/mod_s2s/mod_s2s.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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