Hi Sherif,

For custom headers whatever name you give,  "entity.modificationDate",  
will be used.

However, what you probably meant to do is use setModificationDate(new 
Date()) on the entity/response representation. ie. 
representation.setModificationDate(new Date());

Jon

Sherif Ahmed wrote:
> I've been trying to add Last-Modified Header via the following code in a 
> Filter afterHandle method
>
> Form responseHeaders = (Form) 
> response.getAttributes().get("org.restlet.http.headers");   
>                 
> if (responseHeaders == null)   
> {   
>       responseHeaders = new Form();   
>       response.getAttributes().put("org.restlet.http.headers", 
> responseHeaders);   
> }   
> responseHeaders.add("entity.modificationDate", "Sun, 06 Nov 2005 14:59:42 
> GMT");      
>
>
> However the header in the HTTP Response is not "Last-Modified" as I would 
> have expected, rather a custom header
>
> "entity.modificationDate: Sun, 06 Nov 2005 14:59:42 GMT"
>
> Quick response would be much appreciated
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2360858
>

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

Reply via email to