Software /
code /
prosody
Changeset
6058:1607b03356ed
mod_compression: Only iterate over correctly named and namespaced child tags of compression feature
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Apr 2014 23:48:12 +0200 |
parents | 6057:a3d7b8f4d9c7 |
children | 6059:0cbdf7243540 6060:de4c83feb064 |
files | plugins/mod_compression.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_compression.lua Thu Apr 03 23:40:20 2014 +0200 +++ b/plugins/mod_compression.lua Thu Apr 03 23:48:12 2014 +0200 @@ -48,8 +48,8 @@ local comp_st = stanza:get_child("compression", xmlns_compression_feature); if comp_st then -- do we support the mechanism - for a in comp_st:children() do - local algorithm = a[1] + for a in comp_st:childtags("method") do + local algorithm = a:get_text(); if algorithm == "zlib" then session.sends2s(st.stanza("compress", {xmlns=xmlns_compression_protocol}):tag("method"):text("zlib")) session.log("debug", "Enabled compression using zlib.")