//logger.debug("onOpen");
if (!DefaultWebSocket.class.isAssignableFrom(w.getClass())) {
throw new IllegalStateException();
}
DefaultWebSocket dws = DefaultWebSocket.class.cast(w);
wMap.put(w,webSocket);
try {
AtmosphereRequest r = AtmosphereRequest.wrap(dws.getRequest());
AtmosphereResponse response = AtmosphereResponse.newInstance(config, r, webSocket);
config.framework().configureRequestResponse(r, response);
try {
// Stupid Stupid Stupid
if (r.getPathInfo() == null) {