You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client is the same for both websocket and long polling, the
client code is the same as the original pubsub with the slight add-on
in the location path:
/pubsub/pubsub/pippo/2/khkhgkh in order to simulate the uid and key.
The principle is that two clients can subscribe to the same topic but
only if they are identified users they can pubblish their messages, so
they have to add an userid and a passwordkey in order to push
something.
Using long-polling everything works ok but switching to websocket an error message occurs on the server:
DEBUG o.a.c.version.Jetty8WebSocket - 405 Method Not Allowed
WARN o.a.w.protocol.SimpleHttpProtocol - Status code higher than 400
Status 405 Message Method Not Allowed
Hi,
Using 0.8.5 it was possible to specify the request url inside the push call but with 0.9 it is not possible if I understood well.
I tried anyway using
$.atmosphere.request = { url: document.location.toString() + 'pubsub/' + getElementById('topic').value+"/2/khkhgkh"};
just before the push but I cannot change the _request.url when the push is called and the 405 message is still there.
Tried with lon-polling and websocket, same result.
I made a little change in JQueryPubSub.java adding @path("/{uid}/
{key}") as below
@post
@path("/{uid}/{key}")
@broadcast
public Broadcastable publish(@FormParam("message") String message,
@PathParam("uid") Integer uid, @PathParam("key") String key) {
return new Broadcastable(message, "", topic);
}
The client is the same for both websocket and long polling, the
client code is the same as the original pubsub with the slight add-on
in the location path:
/pubsub/pubsub/pippo/2/khkhgkh in order to simulate the uid and key.
The principle is that two clients can subscribe to the same topic but
only if they are identified users they can pubblish their messages, so
they have to add an userid and a passwordkey in order to push
something.
Using long-polling everything works ok but switching to websocket an error message occurs on the server:
DEBUG o.a.c.version.Jetty8WebSocket - 405 Method Not Allowed
WARN o.a.w.protocol.SimpleHttpProtocol - Status code higher than 400
Status 405 Message Method Not Allowed
The modified pubsub is on line @ http://www.mindthecheck.com/pubsub/
Other info in the thread:
http://groups.google.com/group/atmosphere-framework/browse_thread/thread/728d823bbeeba3a5#
The text was updated successfully, but these errors were encountered: