mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eilon Yardeni <eyard...@gmail.com>
Subject [PATCH] vysper - suggested fix to the XMLTokenizer
Date Mon, 07 Feb 2011 20:35:17 GMT
Hi,

I have been working on an XMPP client based on the building blocks of the
vysper project
and noticed the following:
When the client receives a large Stanza response from the server, some of
the XML tokens
are not parsed properly. Specifically, tag names gets broken (i.e. instead
of "<item ...>" i see "<tem ...>").

I believe the reason is that the XMLTokenizer does not keep state between
two different IoBuffers
that the XMLParser is parsing during the stanza decoding process. It
currently keeps the last position
in the tokenized IoBuffer, but when a new IoBuffer is tokenized, the
previous partial token content
is lost.
The proposed patch fix that by buffering the on-going token chars, rather
than the last position in the current
tokenized IoBuffer.

Regards,
Eilon

Mime
View raw message