Software /
code /
prosody
Comparison
plugins/mod_compression.lua @ 1672:614623f393c6
Add FIXME to remember TLS compression detection.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Thu, 13 Aug 2009 10:19:33 +0200 |
parent | 1671:d196ac213104 |
child | 1673:5f81cd6d4a92 |
comparison
equal
deleted
inserted
replaced
1671:d196ac213104 | 1672:614623f393c6 |
---|---|
14 local compression_stream_feature = st.stanza("compression", {xmlns=xmlns_compression_feature}):tag("method"):text("zlib"):up(); | 14 local compression_stream_feature = st.stanza("compression", {xmlns=xmlns_compression_feature}):tag("method"):text("zlib"):up(); |
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 features:add_child(compression_stream_feature); end | 19 if not session.compressed then |
20 --FIXME only advertise compression support when TLS layer has no compression enabled | |
21 features:add_child(compression_stream_feature); | |
22 end | |
20 end | 23 end |
21 ); | 24 ); |
22 | 25 |
23 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol, | 26 module:add_handler("c2s_unauthed", "compress", xmlns_compression_protocol, |
24 function(session, stanza) | 27 function(session, stanza) |