hi,

I am relatively new to bosh implementation. I am trying to include bosh
support to my xmpp client library however I am facing problem in the
initial few steps itself.

I have a ejabberd server installed with http-bind enabled.

For the implementation I send a session initiating <body/> stream like this:

<body content='text/xml; charset=utf-8'
hold='1'
rid='1573741820'
 to='localhost'
wait='60'
ver='1.6'
xml:lang='en'
secure='true'
xmpp:version='1.6'
ack='1'
xmlns='http://jabber.org/protocol/httpbind'
xmlns:xmpp='urn:xmpp:xbosh'/>

and got a response like this:

<body xmlns='http://jabber.org/protocol/httpbind'
sid='2a7c0c228dfff638473242b0e51c96147fd7dd5c'
 inactivity='60' requests='2' inactivity='30' maxpause='120'
polling='2'  ver='1.6' from='localhost'
authid='3258362421' secure='true' xmlns='urn:xmpp:xbosh'
xmlns="http://etherx.jabber.org/streams'/>

Now as per http://xmpp.org/extensions/xep-0206.html :

If no <stream:features/> element is included in the connection manager's
session creation response, then the client SHOULD send empty request
elements until it receives a response containing a <stream:features/>
element.

So I sent:

<body rid='1573741822' sid='2a7c0c228dfff638473242b0e51c96147fd7dd5c'
xmlns='http://jabber.org/protocol/httpbind'
xmlns:xmpp='urn:xmpp:xbosh'/>

and received from server:

<body xmlns='http://jabber.org/protocol/httpbind' />

still no <stream:features/> element.

Am I sending wrong body stream the second time?

And if I skip <stream:features/> part and request for SASL auth, no
response is returned from the server. The SASL request looks like:

<body rid='1573741821'
sid='2a7c0c228dfff638473242b0e51c96147fd7dd5c'
xmlns='http://jabber.org/protocol/httpbind'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/></body>

Is there anything I am missing?

Thanks,
Bergwolf

Reply via email to