users@grizzly.java.net

Re: Atmosphere + Grizzly: No AtmosphereHandler maps request for /chat Status 500 Message Server Error

From: <miguelnaterasolmedo_at_gmail.com>
Date: Thu, 24 Apr 2014 05:04:46 -0700 (PDT)

Hi Alexey,

I'm debugging this issue, these are my tests & results:

-. When I call 'http://localhost:8181/chat/a/b/c' internally this request
is built: 'AtmosphereRequest{ contextPath= servletPath=/chat
pathInfo=/a/b/c requestURI=/chat/a/b/c destroyable=true}' Well, Http
Get requests seem to work fine.

-. When I call 'new WebSocket('ws://localhost:8181/chat/a/b/c')' internally
this request is built 'AtmosphereRequest{ contextPath= servletPath=null
pathInfo=null requestURI=/chat/a/b/c destroyable=true}' I think the
problem (servletPath & pathInfo are null) only happens when I use websockets

I'm debbuging the method org.glassfish.grizzly.websockets.WebSocketEngine.upgrade(FilterChainContext
ctx, HttpContent requestContent, Mapper mapper) and the param
requestContent receives this value:

HttpRequestPacket (
   method=GET
   url=/chat/a/b/c
   query=null
   protocol=HTTP/1.1
   content-length=-1
   headers=[
      upgrade=websocket
      connection=Upgrade
      host=localhost:8181
      origin=http://localhost:8080
      pragma=no-cache
      cache-control=no-cache
      sec-websocket-key=3pRm4vKnwqvRO8G0/WUNBw==
      sec-websocket-version=13
      sec-websocket-extensions=permessage-deflate; client_max_window_bits,
x-webkit-deflate-frame
      user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/34.0.1847.116 Safari/537.36]
)

but at the end of my debugging session the method org.atmosphere.util.DefaultEndpointMapper.computePath(AtmosphereRequest
req) receives the param req with this value: AtmosphereRequest{
contextPath= servletPath=null pathInfo=null requestURI=/chat/a/b/c
destroyable=true}


Well I hope these tests have some value for you, anyway if you need more
tests feel free to ask.

Have a nice day.

Miguel