strophe.js with http-bind failed to load resource

2019-07-04 01:55发布

问题:

I am trying to connect with ejabberd server using strophe.js, but I got the following error:

 POST http://localhost/http-bind/ 404 (Not Found)
Strophe.Bosh._processRequest.sendFunc @ strophe.js:4614
Strophe.Bosh._processRequest @ strophe.js:4626
Strophe.Bosh._throttledRequestHandler @ strophe.js:4778
Strophe.Bosh._connect @ strophe.js:4177Strophe.Connection.connect @ strophe.js:2335
$scope.login @ app.js:162
fn @ VM165:4
Ic.(anonymous function).compile.d.on.f @ angular.js:23411
$get.n.$eval @ angular.js:15916
$get.n.$apply @ angular.js:16016
(anonymous function) @ angular.js:23416
n.event.dispatch @ jquery-2.1.3.min.js:3
n.event.add.r.handle @ jquery-2.1.3.min.js:3
strophe.js:2784 7

回答1:

I have found that Skype some time use port 80, that was assigned to Apache server.This think may prevent the http-binding.After quit Skype, It works fine.