Opened 11 years ago

Last modified 10 years ago

#5215 new defect

XMPP: use feature discovery before using features

Reported by: urkle Owned by: deryni
Milestone: Patches welcome Component: XMPP
Version: 2.4.0 Keywords:


a request to the server retrieving what features it supports should be made and obeyed. Example.

<iq type='get' from='user@…' to='' id='disco1'>

<query xmlns=''/>


which has a response of <iq to='user@…/Pidgin' from='' type='result' id='disco1'>

<query xmlns=''>

<identity category='server' type='im' name='myserver'/> <feature var=''/> <feature var='jabber:iq:time'/> <feature var='urn:xmpp:time'/> <feature var='vcard-temp'/>



Now if the server does not export the <feature var='urn:xmpp:ping'/> then the client SHOULD NOT send xmpp ping requests (XEP 0199).

Change History (5)

comment:1 Changed 11 years ago by seanegan

  • pending changed from 0 to 1

I thought the nice thing about XEP-0199 is that even if the server doesn't explicitly support it, it still works perfectly.

It says:

The XMPP ping protocol is extremely simple:

   1. The pinging entity sends an IQ-get containing a <ping/> element qualified by the 'urn:xmpp:ping' namespace.
   2. The pinged entity returns either an IQ-result (if it supports the namespace) or an IQ-error (if it does not).

Why do you think we should not send pings?

comment:2 Changed 11 years ago by urkle

  • pending changed from 1 to 0

Well.. The *ping* case is debatable.. the reason the ping was becoming annoying is my xmpp server doesn't implement ping and the log was filling up with all the clients pinging it (which are all pidgin on various platforms).

Others were entity-time and vcard-temp which I ended up implementing in the jabber server.

other DEFINITELY should be checked before.. and I could see ping as an eclusion for the sake of a keep-alive.

comment:3 Changed 11 years ago by deryni

  • Owner changed from nwalp to deryni

I agree that we should be checking things before we use them, I also agree that ping was designed such that it doesn't matter (so I'm not concerned about that case). Patches welcome, if not I'll get around to looking at it eventually.

comment:4 Changed 10 years ago by bernmeister

Move to Patches Welcome?

comment:5 Changed 10 years ago by darkrain42

  • Milestone set to Patches welcome

I've done a little work on this for Pidgin 2.6.0 (mostly using Entity Caps when they're available).

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!