You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Eilon Yardeni (JIRA)" <ji...@apache.org> on 2011/02/07 22:53:57 UTC

[jira] Created: (VYSPER-265) XMLTokenizer does not keep state across parsed IoBuffers

XMLTokenizer does not keep state across parsed IoBuffers
--------------------------------------------------------

                 Key: VYSPER-265
                 URL: https://issues.apache.org/jira/browse/VYSPER-265
             Project: VYSPER
          Issue Type: Bug
          Components: core protocol
    Affects Versions: 0.6
         Environment: Using Vysper for creating XMPP client based on Java NIO.
            Reporter: Eilon Yardeni
             Fix For: 0.6


When receiving a large Stanza, some of the XML tokens
are not parsed properly. Specifically, tag names gets broken (i.e. instead of "<item ...>" i see "<tem ...>").

The XMLTokenizer does not keep state across two different IoBuffers that the XMLParser is parsing during stanza decoding.
It currently only keeps the last position in the tokenized IoBuffer, but when a new IoBuffer is tokenized, 
the previous partial token content is lost.



-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (VYSPER-265) XMLTokenizer does not keep state across parsed IoBuffers

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niklas Gustavsson closed VYSPER-265.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.6)
                   0.7
         Assignee: Niklas Gustavsson

Committed in rev 1068168 together with a test case. Thanks for the patch!

> XMLTokenizer does not keep state across parsed IoBuffers
> --------------------------------------------------------
>
>                 Key: VYSPER-265
>                 URL: https://issues.apache.org/jira/browse/VYSPER-265
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.6
>         Environment: Using Vysper for creating XMPP client based on Java NIO.
>            Reporter: Eilon Yardeni
>            Assignee: Niklas Gustavsson
>              Labels: XML, parser
>             Fix For: 0.7
>
>         Attachments: tokenizer_patch.txt
>
>
> When receiving a large Stanza, some of the XML tokens
> are not parsed properly. Specifically, tag names gets broken (i.e. instead of "<item ...>" i see "<tem ...>").
> The XMLTokenizer does not keep state across two different IoBuffers that the XMLParser is parsing during stanza decoding.
> It currently only keeps the last position in the tokenized IoBuffer, but when a new IoBuffer is tokenized, 
> the previous partial token content is lost.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (VYSPER-265) XMLTokenizer does not keep state across parsed IoBuffers

Posted by "Eilon Yardeni (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VYSPER-265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eilon Yardeni updated VYSPER-265:
---------------------------------

    Attachment: tokenizer_patch.txt


The proposed attached patch fix the issue by buffering the on-going token chars, rather than the last position in the current tokenized IoBuffer.

> XMLTokenizer does not keep state across parsed IoBuffers
> --------------------------------------------------------
>
>                 Key: VYSPER-265
>                 URL: https://issues.apache.org/jira/browse/VYSPER-265
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.6
>         Environment: Using Vysper for creating XMPP client based on Java NIO.
>            Reporter: Eilon Yardeni
>              Labels: XML, parser
>             Fix For: 0.6
>
>         Attachments: tokenizer_patch.txt
>
>
> When receiving a large Stanza, some of the XML tokens
> are not parsed properly. Specifically, tag names gets broken (i.e. instead of "<item ...>" i see "<tem ...>").
> The XMLTokenizer does not keep state across two different IoBuffers that the XMLParser is parsing during stanza decoding.
> It currently only keeps the last position in the tokenized IoBuffer, but when a new IoBuffer is tokenized, 
> the previous partial token content is lost.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (VYSPER-265) XMLTokenizer does not keep state across parsed IoBuffers

Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VYSPER-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991684#comment-12991684 ] 

Niklas Gustavsson commented on VYSPER-265:
------------------------------------------

Previous commit in wrong branch, reverted and committed to trunk in 1068204.

> XMLTokenizer does not keep state across parsed IoBuffers
> --------------------------------------------------------
>
>                 Key: VYSPER-265
>                 URL: https://issues.apache.org/jira/browse/VYSPER-265
>             Project: VYSPER
>          Issue Type: Bug
>          Components: core protocol
>    Affects Versions: 0.6
>         Environment: Using Vysper for creating XMPP client based on Java NIO.
>            Reporter: Eilon Yardeni
>            Assignee: Niklas Gustavsson
>              Labels: XML, parser
>             Fix For: 0.7
>
>         Attachments: tokenizer_patch.txt
>
>
> When receiving a large Stanza, some of the XML tokens
> are not parsed properly. Specifically, tag names gets broken (i.e. instead of "<item ...>" i see "<tem ...>").
> The XMLTokenizer does not keep state across two different IoBuffers that the XMLParser is parsing during stanza decoding.
> It currently only keeps the last position in the tokenized IoBuffer, but when a new IoBuffer is tokenized, 
> the previous partial token content is lost.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira