Software /
code /
prosody
Comparison
net/xmppclient_listener.lua @ 2170:2abca9cc78b1
Merge with 0.6
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 25 Nov 2009 15:41:04 +0000 |
parent | 2163:8d33f94dc3a1 |
parent | 2167:e41a6ea7fc0f |
child | 2454:e4818c49192d |
comparison
equal
deleted
inserted
replaced
2166:fb01f0906564 | 2170:2abca9cc78b1 |
---|---|
59 session.notopen = true; | 59 session.notopen = true; |
60 | 60 |
61 function session.data(conn, data) | 61 function session.data(conn, data) |
62 local ok, err = parser:parse(data); | 62 local ok, err = parser:parse(data); |
63 if ok then return; end | 63 if ok then return; end |
64 log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " ")); | 64 log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_")); |
65 session:close("xml-not-well-formed"); | 65 session:close("xml-not-well-formed"); |
66 end | 66 end |
67 | 67 |
68 return true; | 68 return true; |
69 end | 69 end |