Commit fedc2c0e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed parsing when handling big packets. Characters before the the initial <...

Fixed parsing when handling big packets. Characters before the the initial < of an element are now ignored.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6797 b35dd754-fafc-0310-a699-88a17e54d16e
parent 145f974e
...@@ -259,13 +259,12 @@ class XMLLightweightParser { ...@@ -259,13 +259,12 @@ class XMLLightweightParser {
head.append(ch); head.append(ch);
} else if (status == XMLLightweightParser.INIT) { } else if (status == XMLLightweightParser.INIT) {
if (ch != ' ' && ch != '\r' && ch != '\n' && ch != '<') {
invalidateBuffer();
return;
}
if (ch == '<') { if (ch == '<') {
status = XMLLightweightParser.HEAD; status = XMLLightweightParser.HEAD;
} }
else {
startLastMsg++;
}
} }
} }
if (head.length() > 0 && "/stream:stream>".equals(head.toString())) { if (head.length() > 0 && "/stream:stream>".equals(head.toString())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment