# HG changeset patch # User Kim Alvefur # Date 1470595856 -7200 # Node ID 366964dbddb1f363b742648d06aad9645129f15d # Parent a3a4ed0d34f4cdd81eecd29819b1781854fe2ea0 mod_c2s: Fix whitespace (why does it keep getting messed up?) diff -r a3a4ed0d34f4 -r 366964dbddb1 plugins/mod_c2s.lua --- 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");