://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
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
Restlet provides the 304 plumbing for you. Just setModificationDate() on
your Resource's returned Representation as Jon suggests. The GET headers
returned from my Web site which calls this function are below. If you hit
this resource with Firefox and watch it with Firebug as you refresh (which
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
7 matches
Mail list logo