Thursday, November 16, 2006, 3:07:01 AM, you wrote:

JL> Hi Chris,

JL> In addition to providing the redirectionRef, you also need to set a
JL> redirection response status.
JL> "response.setStatus(Status.REDIRECTION_*).

JL> Best regards,
JL> Jerome  

>> I'm setting a results redirectionRef, assuming this would cause the
>> response back to the client to contain a Location: header. Is this a
>> bug or am I misunderstanding?
>> 
>> I do see that it looks like a Response's redirectionRef does what I
>> want so maybe I'm misunderstanding.

Hello Jerome,
In my case I've overridden the Resource.post(Representation) method in
one of my domain classes so I don't have access to the response. I did
set a status on the result which does get copied into the response in
Handler but that still doesn't work.

For example:
curl -i -d "first=Bob34" http://localhost:8182/person

Returns (notice no Location:)
HTTP/1.1 302 The requested resource can be found under a different URI
Date: Thu, 16 Nov 2006 14:40:32 GMT
Server: Noelios-Restlet-Engine/1.0b21
Content-Type: text/html; charset=ISO-8859-1
Content-Length: 330

My post method does this:
result.setStatus(Status.REDIRECTION_FOUND);
result.setRedirectionRef(new Reference(person.getURI()));

But the setRedirectionRef is never used in the code.

-Chris
-- 
Chris Grindstaff | http://gstaff.org

Reply via email to