Skip to content

Commit

Permalink
Fix for #1013
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Apr 10, 2013
1 parent c0a43ed commit 5b4dd43
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
import static org.atmosphere.cpr.FrameworkConfig.WRITE_HEADERS;
import static org.atmosphere.cpr.FrameworkConfig.XMPP_BROADCASTER;
import static org.atmosphere.cpr.HeaderConfig.ATMOSPHERE_POST_BODY;
import static org.atmosphere.cpr.HeaderConfig.X_ATMOSPHERE_ERROR;
import static org.atmosphere.cpr.HeaderConfig.X_ATMOSPHERE_TRACKING_ID;
import static org.atmosphere.websocket.WebSocket.WEBSOCKET_SUSPEND;

Expand Down Expand Up @@ -1010,6 +1011,9 @@ public void initAtmosphereHandler(ServletConfig sc) throws ServletException {
@Override
public void onRequest(AtmosphereResource r) throws IOException {
logger.debug("No AtmosphereHandler defined.");
if (!r.transport().equals(AtmosphereResource.TRANSPORT.WEBSOCKET)) {
r.getResponse().sendError(501, X_ATMOSPHERE_ERROR);
}
}

@Override
Expand Down

0 comments on commit 5b4dd43

Please sign in to comment.