Software /
code /
prosody
Diff
plugins/mod_compression.lua @ 2885:ae72c0dd6f1f
mod_compression: More robust stanza processing.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 09 Mar 2010 18:19:50 +0500 |
parent | 2884:6807f5fa0eb4 |
child | 2886:3baee526d714 |
line wrap: on
line diff
--- a/plugins/mod_compression.lua Tue Mar 09 18:11:45 2010 +0500 +++ b/plugins/mod_compression.lua Tue Mar 09 18:19:50 2010 +0500 @@ -47,7 +47,8 @@ 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);