[JDEV] Re: [jadmin] jabberd 2.0-a6: c2s: error: Stream error (Expected stream start)

Robert Norris rob at cataclysm.cx
Wed Aug 27 17:21:03 CDT 2003


> I ran ethereal and captured the client registration traffic:
> (gaim to jabberd2)
> <?xml version='1.0'?><stream:stream
> xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'
> to='jabber.example.com'><iq type='get' id='__AUTH__'><query
> xmlns='jabber:iq:auth'><username>steven</username></query></iq>
> 
> (jabberd2 to gaim)
> <?xml version='1.0'?><stream:stream
> xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'
> from='jabber.example.com'
> id='750wue2t59t025316ksbwx9daw1z7zdf5ebzsesx'><stream:error
> xmlns:stream='http://etherx.jabber.org/streams' class='format'><condition
> xmlns='urn:ietf:params:xml:ns:xmpp-streams'><xml-not-well-formed/></condition></stream:error>

Gaim (and probably other clients) send the stream start and the IQ auth
request at the same time (without waiting for the stream start). Because
jabberd2 is not expecting to see packets until after the stream is
established (which it considers to occur after it has sent back the
stream response), it falls over.

I've just ten minutes ago checked into CVS a workaround that will cause
packets sent before the stream is established to be queued, and replayed
after that. It's not really the right thing to do, but it will fix this
particular issue.

Additionally, I've contacted the maintainer of the Jabber stuff in Gaim,
and he is looking over the code. If there's an easy fix, Gaim 0.68
should work correctly.

I encourage client authors who simply throw stuff at the server all at
once to change to waiting for responses (at least before
authentication). That will help everyone :)

Rob.

-- 
Robert Norris                                       GPG: 1024D/FC18E6C2
Email+Jabber: rob at cataclysm.cx                Web: http://cataclysm.cx/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20030828/7012f833/attachment-0002.pgp>


More information about the JDev mailing list