3
votes

I input a jid and pwd on a html form, and use Strophe to connect to openfire, but when I press the login button, the xmpp server response is error 302. I enabled the option on openfire, and restarted it.

var BOSH_SERVICE = 'http://ip:7070/http-bind';
    $('#btn-login').click(function() {
    if(!connected) {
        connection = new Strophe.Connection(BOSH_SERVICE);
        connection.connect($("#input-jid").val(), $("#input-pwd").val(), onConnect);
        jid = $("#input-jid").val();
    }
});

It seems a little harder than to use smack in java because of the network problem?

1

1 Answers

2
votes

The problem is in the uri specified in BOSH_SERVICE.

Correct uri is:

http://ip:7070/http-bind/

Pay attention to the / at the bottom of the string.