Comparison

plugins/mod_compression.lua @ 1674:250bddde4162

Add a TODO for s2s compression support.
author Tobias Markmann <tm@ayena.de>
date Thu, 13 Aug 2009 10:57:56 +0200
parent 1673:5f81cd6d4a92
child 1676:719350956714
comparison
equal deleted inserted replaced
1673:5f81cd6d4a92 1674:250bddde4162
15 15
16 16
17 module:add_event_hook("stream-features", 17 module:add_event_hook("stream-features",
18 function (session, features) 18 function (session, features)
19 if not session.compressed then 19 if not session.compressed then
20 --FIXME only advertise compression support when TLS layer has no compression enabled 20 -- FIXME only advertise compression support when TLS layer has no compression enabled
21 features:add_child(compression_stream_feature); 21 features:add_child(compression_stream_feature);
22 end 22 end
23 end 23 end
24 ); 24 );
25 25
26 -- TODO Support compression on S2S level too.
26 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol, 27 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol,
27 function(session, stanza) 28 function(session, stanza)
28 -- checking if the compression method is supported 29 -- checking if the compression method is supported
29 local method = stanza:child_with_name("method")[1]; 30 local method = stanza:child_with_name("method")[1];
30 if method == "zlib" then 31 if method == "zlib" then