RE: Re: Re: Last-Modified Header

2009-06-11 Thread Jerome Louvel
://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com De : Rob Heittman [mailto:rob.heitt...@solertium.com] Envoyé : mercredi 10 juin 2009 19:23 À : discuss@restlet.tigris.org Objet : Re: Re: Re: Last-Modified Header I can't imagine how

Re: Re: Re: Last-Modified Header

2009-06-11 Thread Rob Heittman
Heittman [mailto:rob.heitt...@solertium.com] *Envoyé :* mercredi 10 juin 2009 19:23 *À :* discuss@restlet.tigris.org *Objet :* Re: Re: Re: Last-Modified Header I can't imagine how the framework would be able to figure that out on its own without being able to examine the Representation

RE: Re: Re: Last-Modified Header

2009-06-11 Thread Jerome Louvel
Cool! This class definitely needs more tests and feed-back to be as perfect as possible when 2.0 RC1 goes out. Cheers, Jerome De : Rob Heittman [mailto:rob.heitt...@solertium.com] Envoyé : jeudi 11 juin 2009 16:06 À : discuss@restlet.tigris.org Objet : Re: Re: Re: Last-Modified Header

Last-Modified Header

2009-06-10 Thread Sherif Ahmed
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

Re: Last-Modified Header

2009-06-10 Thread Jonathan Hall
: 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

RE: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Thanks Jon. What I am trying to accomplish is implementing the Last-Modified / If-Modified-Since logic. Where I would tag responses with a uniform Last-Modified header for all resources/representations and when a request comes in with a If-Modified-Since header I'd send appropriate HTTP 304

Re: Re: Last-Modified Header

2009-06-10 Thread Rob Heittman
, Sherif Ahmed sherifah...@hotmail.comwrote: Thanks Jon. What I am trying to accomplish is implementing the Last-Modified / If-Modified-Since logic. Where I would tag responses with a uniform Last-Modified header for all resources/representations and when a request comes in with a If-Modified

RE: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
-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

RE: Re: Re: Last-Modified Header

2009-06-10 Thread Sherif Ahmed
Cool, This works as you indicate. However implementing this way has a downside. Would be nice that the framework could take care of sending a 304 even without having to get a concrete Representation which has a date set. The idea is to avoid creating a Representation if the Resource has not

Re: Re: Re: Last-Modified Header

2009-06-10 Thread Rob Heittman
I can't imagine how the framework would be able to figure that out on its own without being able to examine the Representation ... chicken, egg, chicken, egg. Still, I understand the concern if Representations are expensive to generate. I wonder if the conditional logic fetches the entity body if