Atmosphere/atmosphere — Issue #208: Jetty8WebSocket - 405 Method Not Allowed
Author: ncolomer
Created: 2012-03-05 23:11:09+00:00
State: open

I detected strange log entries when sending back data from client to server through WebSocket.
A "405 Method Not Allowed" is signaled by the container when pushing messages back to the resource.

Client side, I store the endpoint in a global variable (`endpoint = $.atmosphere.subscribe(...)`) and reuse it to push new data (`endpoint.push(...)`). Server side, I simply suspend connections and add a WebSocket listener to handle upstream communication.

This happens whatever version of Atmosphere I used (0.8.5 or 0.9-SNAPSHOT) and Jetty8 web container.

```
09:36:01.428 [qtp1452012524-25] INFO org.mappush.resource.EventResource - Initializing ApiResource
09:36:01.429 [qtp1452012524-25] DEBUG o.a.c.version.Jetty8WebSocket - 405 Method Not Allowed
09:36:01.430 [qtp1452012524-25] WARN o.a.w.protocol.SimpleHttpProtocol - Status code higher than 400 Status 405 Message Method Not Allowed
09:36:01.433 [qtp1452012524-25] INFO org.mappush.resource.EventResource - New bounds {"southLat":-32.15033268225283,"northLat":57.954031586405726,"westLng":-122.6171875,"eastLng":88.3203125} for resource 83533256
```

The project can be found on GitHub [here](https://github.com/ncolomer/MapPush).
To reproduce, clone the project (experimental branch), and execute a `mvn jetty:run`. Open `http://localhost:8080/MapPush/` and hit the connect button. Simply move the maps tile to generate the log entries above.