[ejabberd] http_bind BAD REQUEST

Jack Moffitt jack at chesspark.com
Thu Aug 13 08:59:18 MSD 2009


> I modified the BOSH_SERVICE in
> basic.js to point to http://server:5280/http-bind/ and i dont get much
> further than seing the commands SENT on the screen.  i looked in
> firebug and dont see any response (although it is a 200 OK) that i
> would expect to see over the BOSH connection.

And the URL you use to test the app is http://server:5280/basic.html?
If basic.html is not served from the same domain and port, Firefox and
Safari will not allow this per standard javascript security policy.
This is referred to as a cross domain request, and is prohibited.

This will work in Safari if you access basic.html with file:// urls,
but Firefox won't even work in that case.

The normal solution is to proxy hte http-bind URL somewhere under your
web server tree so that it looks like a local request.  You can also
use something like Tape to do this: http://github.com/metajack/tape

Strophe will have a Flash-based workaround for this in a day or so,
but you will still have to make sure that your http-bind server will
serve up flash's required crossdomain.xml file.

> to the listen section.  I tried testing this using command line XML
> and it seems to work fine, just not from strophe.  Anything specific
> on the ejabberd side that we need to do to make this work ?

Looks like your ejabberd config is fine.  I'm pretty sure you are just
running into browser security policy.

jack.


More information about the ejabberd mailing list