Hi Bryan,

 

I’ve just added protected redirect(...) and retry(...) methods on 
ClientResource to facilitate extension of default behavior such as passing on 
cookies. Checked in SVN trunk.

 

Does that help?

 

Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~  <http://www.restlet.org/> 
http://www.restlet.o​rg
Noelios Technologies ~  <http://www.noelios.com/> http://www.noelios.com

 

 

 

De : Bryan Hunt [mailto:[email protected]] 
Envoyé : mercredi 16 mars 2011 21:31
À : [email protected]
Objet : Re: ClientResource not setting cookies on a redirectq

 

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 
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2710844>
 &dsMessageId=2710844

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2717421

Reply via email to