Non-blocking IO hanging when stream begins with XML declaration

For clients like Gaim that begin the authentication stream with an xml declaration, the authentication in non-blocking IO hangs.

This is because the XMLLightweightParser assumes that the opening tag is the stream:stream tag. Since it’'s actually the second tag, the parser is waiting for a complete stream:stream tag, and never receives it, until the stream closes, of course.

Example of Gaim stream opening:

<?xml version=''1.0'' ?>

Other authentication stream:

<stream:stream to=’‘monteverdi’’ xmlns=’‘jabber:client’’ xmlns:stream=’‘http://etherx.jabber.org/streams’’ version=’‘1.0’’>

I have a fix for this if you want it. My local build works fine after I made the fix.

I expirienced this problem too. Details in http://www.jivesoftware.org/community/message.jspa?messageID=127128#127128