Commit 74a51923 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed parsing to skip LF, CR, etc before stream header elements.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6568 b35dd754-fafc-0310-a699-88a17e54d16e
parent a3a53261
......@@ -26,6 +26,7 @@ import java.util.List;
* an message is presents.
*
* @author Daniele Piras
* @author Gaston Dombiak
*/
class XMLLightweightParser {
// Chars that rappresent CDATA section start
......@@ -228,6 +229,10 @@ class XMLLightweightParser {
("stream:stream>".equals(head.toString()) || ("?xml>".equals(head.toString())))) {
// Found closing stream:stream
int end = buffer.length() - readByte + (i + 1);
// Skip LF, CR and other "weird" characters that could appear
while (startLastMsg < end && '<' != buffer.charAt(startLastMsg)) {
startLastMsg++;
}
String msg = buffer.substring(startLastMsg, end);
foundMsg(msg);
startLastMsg = end;
......
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