diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-03-09 18:19:50 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-03-09 18:19:50 +0500 |
commit | a4d78f333f96d6a1fe08bdd66e1b7cdf1f0e124a (patch) | |
tree | 067c2f391b2313d9f17458eca56fe6627c8682e3 | |
parent | b01e95ae145a66dd28529e4891bc244bb70ca584 (diff) | |
download | prosody-a4d78f333f96d6a1fe08bdd66e1b7cdf1f0e124a.tar.gz prosody-a4d78f333f96d6a1fe08bdd66e1b7cdf1f0e124a.zip |
mod_compression: More robust stanza processing.
-rw-r--r-- | plugins/mod_compression.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua index bdecf467..379927df 100644 --- a/plugins/mod_compression.lua +++ b/plugins/mod_compression.lua @@ -47,7 +47,8 @@ module:add_handler({"c2s_unauthed", "c2s"}, "compress", xmlns_compression_protoc end -- checking if the compression method is supported - local method = stanza:child_with_name("method")[1]; + local method = stanza:child_with_name("method"); + method = method and method[1]; if method == "zlib" then -- create deflate and inflate streams local status, deflate_stream = pcall(zlib.deflate, compression_level); |