Skip to main content

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

Missing adding the cookie into the list by the looks of it.

HttpCookie cookie = new HttpCookie("username","user1") ;

List<HttpCookie> cookies = new ArrayList<HttpCookie>() ;
cookies.add(cookie);


On Thu, Jul 31, 2014 at 12:17 AM, Manoj Khangaonkar <khangaonkar@xxxxxxxxx> wrote:
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


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top