Software /
code /
prosody
Comparison
plugins/mod_compression.lua @ 1677:f0961ce9830c
Forgot to use the configured compression_level. Now it's used.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Thu, 13 Aug 2009 12:05:33 +0200 |
parent | 1676:719350956714 |
child | 1678:79eb903d0e67 |
comparison
equal
deleted
inserted
replaced
1676:719350956714 | 1677:f0961ce9830c |
---|---|
43 session.log("info", method.." compression selected."); | 43 session.log("info", method.." compression selected."); |
44 session.send(st.stanza("compressed", {xmlns=xmlns_compression_protocol})); | 44 session.send(st.stanza("compressed", {xmlns=xmlns_compression_protocol})); |
45 session:reset_stream(); | 45 session:reset_stream(); |
46 | 46 |
47 -- create deflate and inflate streams | 47 -- create deflate and inflate streams |
48 local deflate_stream = zlib.deflate(9); | 48 local deflate_stream = zlib.deflate(compression_level); |
49 local inflate_stream = zlib.inflate(); | 49 local inflate_stream = zlib.inflate(); |
50 | 50 |
51 -- setup compression for session.w | 51 -- setup compression for session.w |
52 local old_send = session.send; | 52 local old_send = session.send; |
53 | 53 |