Quantcast
Channel: Ignite Realtime : Discussion List - Openfire Support
Viewing all articles
Browse latest Browse all 4596

Subscription process not following Jabber protocol standards

$
0
0

Hi,

 

I''ve been having problems with the subscription process using my client (ie. trying to add and subscribe to a user).  As a result of my debugging, it seems to me that the server is sending a stray packet that it should not be sending.

 

I have pasted the following snippet from http://www.jabber.org/protocol/subscriptions.html :

 


 

2.  The Jabber User''s client then sends a <presence/> packet of type=''subscribe'' to the contact:

 

 

JABBER USER SENDS:

  <presence

      to=''contact@host''

      type=''subscribe''>

    <status>I would like to add you to my roster.</status>

  </presence>

 

3.  The Jabber User''s client then receives a second "roster push" from the server with the Contact in the pending sub-state of the ''none'' subscription state; this pending sub-state is denoted by the inclusion of the ask=''subscribe'' attribute in the roster item:

 

 

JABBER USER RECEIVES:

  <iq type=''set''>

    <query xmlns=''jabber:iq:roster''>

      <item

          jid=''contact@host''

          subscription=''none''

          name=''contact''

          ask=''subscribe''/>

    </query>

  </iq>

 

4. Once the Jabber User''s client sends the <presence/> packet of type=''subscribe'', that packet is delivered to the Contact (we will assume for the moment that the Contact is online):

 

 

CONTACT RECEIVES:

  <presence

      to=''contact@host''

      type=''subscribe''

      from=''jabberuser@host''>

    <status>I would like to add you to my roster.</status>

  </presence>

 


 

I have discovered that, in addition to step 4, "CONTACT" also receives a packet like this:

 

  <iq type=''set''>

    <query xmlns=''jabber:iq:roster''>

      <item

          jid=''jabberuser@host''

          subscription=''none''

          ask=''subscribe''/>

    </query>

  </iq>

 

This is exactly like the packet that "JABBERUSER" receives in step 3, except that this packet is addressed to ''jabberuser@host'', and the ''name'' attribute is missing (which makes sense).  I''m sure that this packet should not be sent, as the protocol docs do not mention it.

 

Please let me know if this is indeed a bug, as it is messing up my client...


Viewing all articles
Browse latest Browse all 4596

Trending Articles