[Standards] XMPP Ping with(out) 'to' argument ?

Peter Saint-Andre stpeter at jabber.org
Mon May 7 19:31:09 UTC 2007

Tomasz Sterna wrote:
> Dnia 07-05-2007, Pn o godzinie 13:11 -0600, Peter Saint-Andre
> napisał(a):
>>> Not really.
>>> It means "process this packet on behalf of myself".
>>> It's intended for client <-> session-manager interaction.
>>> So it's more like the "to" is your bare JID.
>> But the server replies on behalf of IQs sent to the bare JID, so it's 
>> effectively the same as sending to='yourserver.tld' 
> I disagree.
> Please send:
> <iq type="get" id="iq1">
> <vCard xmlns="vcard-temp" />
> </iq>
> and:
> <iq to="yourserver.tld" type="get" id="iq2">
> <vCard xmlns="vcard-temp" />
> </iq>
> and see the difference.

That's because servers have vCards.

Please send:

<iq type='get' id='roster1'>
   <query xmlns='jabber:iq:roster'/>


<iq to='you at yourserver.tld' type='get' id='roster2'>
   <query xmlns='jabber:iq:roster'/>

Is there a difference?

In the case of pings, you're pinging the connection between you and your 
server, so IMHO there is no difference between the following...

1. From full JID to bare JID.

<iq from='stpeter at jabber.org/roundabout' to='stpeter at jabber.org' 
type='get' id='ping1'>
   <ping xmlns='urn:xmpp:ping'/>

2. From full JID to no JID.

<iq from='stpeter at jabber.org/roundabout' type='get' id='ping2'>
   <ping xmlns='urn:xmpp:ping'/>

(Implicitly "to" stpeter at jabber.org and therefore answered on my behalf 
by my server.)

3. From full JID to server JID.

<iq from='stpeter at jabber.org/roundabout' to='jabber.org' type='get' 
   <ping xmlns='urn:xmpp:ping'/>

In all three cases, the server answers, so there's no difference.


Peter Saint-Andre
XMPP Standards Foundation

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

More information about the Standards mailing list