Subject: BOSH Connection and OpenFire problem
Hi, I am using agsXMPP for connecting to an OpenFire XMPP server using its HTTP bind feature. I had to do some trial and error with XmppClientConnection constructor and properties but finally I was able to have things work together. My application works flawlessly using BOSH just like when it is using standard TCP connection but there is a problem.
After exchanging some messages, I get WebException of 404. The exception is thrown in totally random occasion. Using a proxy server I managed to capture what is causing this.
After connection is completely established, at some point OpenFire responds with this body:
First Bug is that agsXMPP does not interpret (actually ignores) this respond and continues to send remaining requests, and because of this OpenFire returns a 404 HTTP with the following header as soon as the next request is sent:
which obviously indicates that BOSH session was terminated after that "policy-violation" was sent and that current SID is no longer valid. I could try to add the code for interpreting the "policy-violation" body but this will not solve my problem.
Maybe 'bug reports' section is not the right place but I wonder if it is a known issue with OpenFire, Is HTTP bind really supposed to work with BOSH connection or not?
I checked "XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)" here:
http://xmpp.org/extensions/xep-0124.html
My guess is that "policy-violation" errors I get is due to 'overactivity' condition stated in XEP but I don't see more than two simultaneous requests and OpenFire always returns '2' as "requests" attribute in response to BOSH Session request.
Is this a XEP implementation error in agsXMPP side? Or OpenFire is to be blamed?
P.S: I'm using BoshClientConnection.cs code from SVN.
P.S 2: Sorry for my bad english.
After exchanging some messages, I get WebException of 404. The exception is thrown in totally random occasion. Using a proxy server I managed to capture what is causing this.
After connection is completely established, at some point OpenFire responds with this body:
<body xmlns="http://jabber.org/protocol/httpbind" type="terminate" condition="policy-violation" />
First Bug is that agsXMPP does not interpret (actually ignores) this respond and continues to send remaining requests, and because of this OpenFire returns a 404 HTTP with the following header as soon as the next request is sent:
Responce Code: 404 Invalid SID.
which obviously indicates that BOSH session was terminated after that "policy-violation" was sent and that current SID is no longer valid. I could try to add the code for interpreting the "policy-violation" body but this will not solve my problem.
Maybe 'bug reports' section is not the right place but I wonder if it is a known issue with OpenFire, Is HTTP bind really supposed to work with BOSH connection or not?
I checked "XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)" here:
http://xmpp.org/extensions/xep-0124.html
My guess is that "policy-violation" errors I get is due to 'overactivity' condition stated in XEP but I don't see more than two simultaneous requests and OpenFire always returns '2' as "requests" attribute in response to BOSH Session request.
Is this a XEP implementation error in agsXMPP side? Or OpenFire is to be blamed?
P.S: I'm using BoshClientConnection.cs code from SVN.
P.S 2: Sorry for my bad english.