Subject: [xmpp] 3920: sending stanzas before binding a resource?

From: Peter Saint-Andre <[email-masked]>
Date: Fri, 31 Jul 2009 17:10:43 +0200

I had a chat with Justin Karneges some time ago about a question that is
slightly ambiguous in RFC 3920: can the client send stanzas before it
has bound a resource? My answer is that it can, but only to exchange
stanzas with the server itself, where the server itself might be acting
on behalf of the account for which the client has authenticated. For
example, the client might send a service discovery request to the server
itself or to its own bare JID (say, to determine what other resources
are currently authenticated). To clarify this, I have modified the first
paragraph of the resource binding overview to read as follows:

   After a client authenticates with a server, it MUST bind a specific
   resource to the stream so that the server can properly address the
   client (see Section 3).  That is, there MUST be an XMPP resource
   identifier associated with the bare JID (<localpart@domain>) of the
   client, so that the address for use over that stream is a full JID of
   the form <localpart@domain/resource>.  This ensures that the server
   can deliver XML stanzas to and receive XML stanzas from the client in
   relation to entities other than the server itself, as explained under
   Section 11 (the client could exchange stanzas with the server itself
   before binding a resource since the full JID is needed only for
   addressing outside the context of the stream negotiated between the
   client and the server, but this is not commonly done).

I am on a plane right now so I am not able to create an issue about this
in the issue tracker.

Peter

- --
Peter Saint-Andre
https://stpeter.im/