Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 7539:366964dbddb1
mod_c2s: Fix whitespace (why does it keep getting messed up?)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 07 Aug 2016 20:50:56 +0200 |
parent | 7466:f28fa742def3 |
child | 7540:e69df8093387 |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Sun Aug 07 20:49:50 2016 +0200 +++ b/plugins/mod_c2s.lua Sun Aug 07 20:50:56 2016 +0200 @@ -246,9 +246,9 @@ function session.data(data) -- Parse the data, which will store stanzas in session.pending_stanzas if data then - data = filter("bytes/in", data); - if data then - local ok, err = stream:feed(data); + data = filter("bytes/in", data); + if data then + local ok, err = stream:feed(data); if not ok then log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_")); session:close("not-well-formed");