[Standards] Error handling for "stream:error" like "see-other-host"

Peter Saint-Andre stpeter at stpeter.im
Sun Feb 8 00:23:02 UTC 2009


Jiří Zárevúcký wrote:
> If you can't connect to the domain provided in the error, then it is
> probably error on the Google side. Anyway, specification clearly
> states the domain is to be provided as XML character data of the
> <see-other-host/> element. The code you encountered sends it in a text
> child, which is obviously wrong. I suggest you implement the right
> behavior according to the specification (which needs some
> clarification, but I suppose you are expected to connect to the
> proposed domain) and ignore google's.

As always, refer to rfc3920bis for clearer definitions. I have pasted
the current text below. Available here:

http://xmpp.org/internet-drafts/draft-saintandre-rfc3920bis-08.html#streams-error-conditions-see-other-host

***

The server will not provide service to the initiating entity but is
redirecting traffic to another host; the XML character data of the
<see-other-host/> element returned by the server SHOULD specify the
alternate hostname or IP address at which to connect, which SHOULD be a
valid domain identifier but MAY also include a port number; if no port
is specified, the initiating entity SHOULD perform a [DNS‑SRV]
(Gulbrandsen, A., Vixie, P., and L. Esibov, “A DNS RR for specifying the
location of services (DNS SRV),” February 2000.) lookup on the provided
domain identifier but MAY assume that it can connect to that domain
identifier at the standard XMPP ports (i.e., 5222 for client-to-server
connections and 5269 for server-to-server connections).

C: <?xml version='1.0'?>
   <stream:stream
       from='juliet at im.example.com'
       to='im.example.com'
       version='1.0'
       xmlns='jabber:client'
       xmlns:stream='http://etherx.jabber.org/streams'>

S: <?xml version='1.0'?>
   <stream:stream
       from='im.example.com'
       id='++TR84Sm6A3hnt3Q065SnAbbk3Y='
       to='juliet at im.example.com'
       version='1.0'
       xml:lang='en'
       xmlns='jabber:client'
       xmlns:stream='http://etherx.jabber.org/streams'>
   <stream:error>
     <see-other-host
         xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
       im.example.com:9090
     </see-other-host>
   </stream:error>
   </stream:stream>

***


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20090208/56d38f45/attachment.bin>


More information about the Standards mailing list