://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
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
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
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
:
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
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
, 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
-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
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
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
10 matches
Mail list logo