Hi Thierry, Setting the cookies manually doesn't work since the client is asked to to an automatic re-direct in which the cookies must already be set. When the client returns from the call to post(), it's too late to set the cookies - the server has already returned a failure in the resulting representation from the call to post().
Bryan On Mar 16, 2011, at 3:20 PM, Thierry Boileau wrote: > Hello Bryan, > > I think your question is related to this running issue : > http://restlet.tigris.org/issues/show_bug.cgi?id=42. I've updated it with > your accurate comment. > At this moment, you can retrieve the cookies settings (see > Response#getCookieSettings()) and set the ClientResource manually (see > ClientResource#setCookies) ... > > Best regards, > Thierry Boileau > > I have a unit test where I'm using the ClientResource to do a POST, the > server is adding a CookieSetting to the response, and then calls > redirectSeeOther(). The ClientResource properly does a GET to the redirected > URI, but does not send the Cookie. When I test the server with Safari, it > works fine. Am I missing a setting on the ClientResource? > > I'm using Restlet 2.0.5. > > Bryan > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2710844 > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2711986