powered by Jive Software

XIFF (and SparkWeb) now support BOSH 1.6

I have updated the XIFF library to be compatible with BOSH 1.6. As SparkWeb is based on XIFF, most of the information here also applies to SparkWeb. Main good news are:

  • Login phase and communication using BOSH is noticeably faster thanks to new overactivity rules of 1.6.
  • BOSH connection is tested and working with Openfire, Tigase and ejabberd.

Additional Work

  • Added logging support to XIFF using Flex logging API (mx.logging).
  • Moved SASL logic from XMPPBOSHConnection to XMPPConnection, so now both connection types (BOSH and socket) share the same authentication code. Previously, socket connection was using non-SASL authentication.
  • Cleaned up some dead code and made BOSH connection class more configurable.
  • Fixed a few Openfire BOSH issues that appeared when testing XIFF.

Known Issues

This updated version of XIFF will be fully compatible with the updated Openfire and Openfire’s BOSH update will be included in version 3.6.x. However, there is an issue with Openfire versions released before the update.

According to XEP-0206, after a successful authentication, clients should send a body with xmpp:restart attribute set to true. But older Openfire versions do not recognize xmpp:restart, handling the request as if it was a polling request. Thus, it responds to the client after 30 seconds.

If you use the updated version of XIFF or SparkWeb with a version of Openfire that does not support BOSH 1.6 (i.e. lower than 3.6), please be aware that you will be experiencing a latency of 30 seconds during logins.

Hi! Excelllent!

I’ve being working on it and I have some doubts. I am using Openfire and according to the Administrator, it supports BOSH 1.6.

I get to connect using http successfully, however, at some point, I can’t realise when the connection process has finished, wether successfully or not. What I see is that the execution flow, reaches the method restartStream of the XMPPBOSHConnection.as file, and there it just stops doing anything else. The output of the process I described is the following:

18:35:45.718 [DEBUG] BOSH connect()
18:35:45.734 [INFO] OUTGOING
18:35:46.718 [INFO] INCOMING stream:featuresDIGEST-MD5JIVE-SHAREDSECRETPLAINCRAM-M D5</stream:features>
18:35:46.718 [DEBUG] Polling interval: 5000
18:35:46.718 [DEBUG] Inactivity timeout: 30000
18:35:46.718 [DEBUG] Max requests: 2
18:35:46.718 [DEBUG] Max pause: 0
18:35:46.750 [INFO] OUTGOING c2hlYml0YUBidXp6YWEuY29tAHNoZWJpdGEAaGlnaGJlcnJ5
18:35:47.343 [INFO] INCOMING
18:35:47.359 [INFO] OUTGOING

I tried dispatching a LoginEvent at this function, and it seemed to work once, but after that I started receiveing Not Authorized responses from the server.

I would really appretiate any help on this.Thanks in advance!!!

Has the issue been resolved? I sometimes experience 20-30 seconds dely on login.