Hi Hannes, In Restlet 1.1, the conditions are checked *after* the representation is retrieved, because it needs the representations metadata in order to check those conditions.
In Restlet 2.0, it is possible to just provide the metadata (RepresentationInfo) so the conditions are checked before actually constructing the full blown representation. On the client-side, use the request#conditions#unmodifiedSince property to set the HTTP header. See this wiki page for a complete mapping between Restlet properties and HTTP headers: http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/130-restlet.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Hannes Ebner [mailto:hannes.eb...@gmail.com] Envoyé : vendredi 16 octobre 2009 00:49 À : discuss@restlet.tigris.org Objet : Condition handling Hello, I'm trying to figure out how to work with Restlets and conditions. I assume that the conditions are checked already after the resource was constructed and before the representation methods are called. So how do I tell the framework which condition my resource expects? I know how to read the value manually, but I couldn't figure out how to tell that my resource expects a certain value for the If-Unmodified-Since header. If the If-Unmodified-Since header is set, Restlets return a 412 status before I even have a chance to react on it (i.e. tell the date to be expected). Thanks, Hannes ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24080 52 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2412073