Http-bind does not work, 400 BAD REQUEST

Hi,

I think that I had read all most every post referring http-bind and my installation of OpenFire doesn’t want to work.

I’m running Openfire version 3.6.4 over windows 7 64bits. When I try to connect to my server over http-bind using strophe it doesn’t work and I get a 400 bad request powered by jetty response.

I’d tried changing ports, properties, but nothing looks to work.

Could some one tell me what I’m doing wrong?

Thanks a lot.

Martin.

Martin,

You need a trailing / on your URL

daryl

Ok, I put a / at the end of the url, but nothing had changed.

Now, I’ve installed openfire in a linux ubuntu and it have the same error.

Could the problem be the java version?

Thanks in advance.

Martin.

Hi,

I am also facing the same issue.

I have been following the book XMPP Programming with Java Script and jQuery by Jack Moffit.

The web client works fine when used witht the http-bind url (http://bosh.metajack.im:5280/xmpp-httpbind) provided in the book and also the procedure for the connection works fine with locally installed “ejabberd” XMPP server.

However it fails when I tried to run the same code after installing Openfire 3.7.0 and the Databse as MSSQL 2008 on windows.

The http-bind url (http://127.0.0.1:7070/) shows a page saying Http Bind but from the code it is inaccessable.

I have created two user accounts from the admin web console.

This is pretty confusing.

If anyone has step by step solution for this then I will be very thankful to you.

Thanks,

Rafay.

i know this post is kind of old and they may have fixed it, i dont know…

anyhow when i ran into the same troubles as you, i discovered that openfire did not create streams the same way as everyone else. they default to flash-compatible streams - i forget the exact syntax of it.

for example:

non-flash clients require stream:stream

openfire sends something else ( stream:flash? )

it might be http-bind specific, but again i dont know. i also dont know of any workarounds for it. my solution was to go back to ejabberd.

hope this helped =)

Try if it works when you go to the admin webinterface -> server -> server settings -> http binding (http://yourserver:9090/http-bind.jsp) and set the “script syntax” to “enabled”.

I have the same issue and am discouraged to see that issue seems to have been around awhile.since there are several related threads without answers:

If I navigate to http://server:7070, I get a page that says OpenFire HTTP Binding Service.

If I navigate to http://server:7070, I get a 400 error, Bad Request, from jetty.

OpenFire 3.7.0 on Windows XP (32 bit)

Originally, I installed via the zip file, then uninstalled and re-installed using the installer. No difference, same 400 error either way.

IE 8

I confirmed HTTP Binding is enabled in the Server Settings. I tried disabling, restarting OpenFire, enabling, and restarting OpenFire. This had no effect.

Java 1.6 Update 26 with the zip version

Unsure what version of JRE is embedded with OpenFire installer.

Hi,

400 Bad Request is afaik standard behaviour when you navigate to yourserver:7070 because the browser doesn’t send a valid XML (I can’t tell that for sure because I’m using punjab as the http-bind service due to stability but I think it’s correct when a 400 bad request is returned when accessing the page with a browser).

Doesn’t it work when you connect with your jabber client with http-bind?

Regarding JRE: I don’t think there’s a JRE embedded in Openfire, it uses the one on your system.

I believe this issue is due to the fact the browser is doing a HTTP GET, whereas openfire is expecting a HTTP POST.

daryl

just copy all file whitin flXHR 's depoly folder.

maybe you just copied flXHR.js

strophe use flash to communicate with XMPP server,

so at least ,you must have some swf file

BTW,you should use web server to host your file, do not double click your html file.