Comparison

plugins/mod_s2s/mod_s2s.lua @ 5173:b22d24b5a89a

mod_s2s: Detect TLS compression
author Kim Alvefur <zash@zash.se>
date Wed, 24 Oct 2012 19:05:56 +0200
parent 5120:bcabea740c00
child 5274:0d08c0965824
comparison
equal deleted inserted replaced
5171:b4b302fe415c 5173:b22d24b5a89a
182 session.version = tonumber(attr.version) or 0; 182 session.version = tonumber(attr.version) or 0;
183 183
184 -- TODO: Rename session.secure to session.encrypted 184 -- TODO: Rename session.secure to session.encrypted
185 if session.secure == false then 185 if session.secure == false then
186 session.secure = true; 186 session.secure = true;
187
188 -- Check if TLS compression is used
189 local sock = session.conn:socket();
190 if sock.info then
191 session.compressed = sock:info"compression";
192 elseif sock.compression then
193 session.compressed = sock:compression(); --COMPAT mw/luasec-hg
194 end
187 end 195 end
188 196
189 if session.direction == "incoming" then 197 if session.direction == "incoming" then
190 -- Send a reply stream header 198 -- Send a reply stream header
191 199