[patch] weird error with regard to namespace
Martin Atkins
mart at degeneration.co.uk
Wed Nov 7 19:13:45 UTC 2007
Michael Scherer wrote:
>
> <?xml version='1.0'?>
> <stream:stream xmlns:stream='http://etherx.jabber.org/streams'
> xmlns='jabber:server' xmlns:db='jabber:server:dialback'>
>
> me :
> <?xml version="1.0" encoding="UTF-8"?>
> <stream:stream id="bc0f86c8e3b9f3d8eb92a827fcc8c8eb781bd189"
> xmlns:db='jabber:server:dialback'
> xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:server">
>
> nuxo :
> <db:result xmlns:db='jabber:server:dialback' to='example.org'
> from='jabber.nuxo.net'>4cc60c0c6a7461ad12340a9300f912d17ff3e3f3</db:result>
>
> me :
> <db:result from='example.org' to='jabber.nuxo.net' type='valid'/>
>
> nuxo :
> <iq xmlns='jabber:client' type='result' id='141' from='xxxx at jabber.nuxo.net/Foo'
> to='misc at example.org/Parents'>
> <query xmlns='jabber:iq:version'>
> <name>Foo</name>
> <version>0.3-svn</version>
> <os>Linux</os>
> </query>
> </iq>
>
> me :
> <stream:error><unsupported-stanza-type
> xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
> <text xmlns='urn:ietf:params:xml:ns:xmpp-streams'>jabber:client</text>
> </stream:error>
> </stream:stream>
I'm a little confused as to what's going on here. The server seems to
suddenly start using the client-to-server namespace (jabber:client) for
no apparent reason. As far as I'm aware, there is no valid situation for
elements in the jabber:client to turn up in a server-to-server stream.
I suspect that this is a bug in the remote server implementation.
Presumably their code is just copying the stanza elements directly from
another client without altering the namespace, and then their XML
serializer obligingly adds the xmlns attribute.
I would guess that there are implementations out there that completely
disregard the namespace of the stanza packets so this appears to work
for some servers. However, I'm pretty sure that DJabberd is correct in
this case.
The following section of the XMPP spec is careful to make the
distinction between these two namespaces, which have subtly different
processing requirements:
<http://www.xmpp.org/rfcs/rfc3920.html#stanzas>
More information about the Djabberd
mailing list