Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] sending cookie with websocket clientupgraderequest

Hi ,

I am trying to send some data as a cookie with the websocket

WebSocketClient client = new WebSocketClient();
ClientUpgradeRequest request = new ClientUpgradeRequest();
      HttpCookie cookie = new HttpCookie("username","user1") ;
      List<HttpCookie> cookies = new ArrayList<HttpCookie>() ;
      request.setCookies(cookies);
      client.connect(socket, echoUri, request);


On the serverside I do not get the cookie either using getCookies or using the headers.
headers as printed from the server.
Header Cache-Control == no-cache,
Header Connection == Upgrade,
Header Host == localhost:8080,
Header Pragma == no-cache,
Header Sec-WebSocket-Key == SAAtlNIjOCvrE+lHSIUCFw==,
Header Sec-WebSocket-Version == 13,
Header Upgrade == websocket,

Is something wrong with the above code ?

 

regards


Back to the top