Hi all, After reading the REST discussion thread again, here is a summary of the various arguments given by participants: - Use zero-length entities instead. (Jon Hanna) - Maybe an indication that another resource/representation design is preferable (Bruno Harbulot) - "It seems harder to be consistent in modeling the application state by interpreting the meaning of a non-existing resource" (Bruno Harbulot) - "Mapping "200 OK" = allow and "404 Not Found" = deny is an abuse of HTTP response codes" (Brian Smith) - "The absence of a resource is explicitly devoid of meaning in HTTP" (Aristotle Pagaltzis)
For the last point, an alternative would be to use a Boolean value/representation to represent the presence or absence of the right, instead of relying on HTTP status codes. My conclusion is that the support of PUT with no entity is not necessary for now in Restlet. Any other opinion? Best regards, Jerome -----Message d'origine----- De : Jerome Louvel [mailto:[EMAIL PROTECTED] Envoye : jeudi 29 mai 2008 11:20 A : [email protected] Objet : RE: PUT and entity Hi Jim, I have just sent an email to the REST discuss list. Let's see what comes out of it to decide what to do: http://thread.gmane.org/gmane.comp.web.services.rest/8046 If no one says it is forbidden, we'll allow it technically in the framework. Best regards, Jerome -----Message d'origine----- De : Jim Alateras [mailto:[EMAIL PROTECTED] Envoye : jeudi 29 mai 2008 00:04 A : [email protected] Objet : Re: PUT and entity Rhett, Yes, forgot i asked this question before. IMHO i wouldn't encode the 'put MUST have a non-null entity) policy in the framework. If you do then you should provide for a mechanism to override it (allowNullEntity or something). From my reading of the HTTP spec doesn't specify that a PUT *MUST* have an entity although i agree that in most cases that would be the case. In my particular case the URL includes all the information required to create the resource but i have to stick in a non-null entity body to get this to work with the framework cheers </jima> On 27/05/2008, at 12:37 PM, Rhett Sutphin wrote: > Hi Jim, > > On May 26, 2008, at 7:09 PM, Jim Alateras wrote: > >> Any reason why, i nthe restlet framework, a PUT expects to have an >> entity. When i issue a PUT with an empty entity i get a 400 response. > > Last time you asked this question ( http://restlet.tigris.org/servlets/ReadMsg?list=discuss&msgNo=5132 > ), I pointed you to an earlier discussion ( http://restlet.tigris.org/servlets/ReadMsg?listName=discuss&msgNo=3902 > ). The summary is: the HTTP spec is vague, but most > implementations expect PUTs to have an entity. For more details, > read that second-linked thread. Is there something in particular > that was unclear or that you disagreed with? > > Rhett cheers </jima>

