Hello all,

from what I see in the code of the "Resource" class, when a resource 
does not return a representation (ie null, not empty) and returns a 2** 
status (except 204), then a 404 status is automatically returned.
That is to say, at this moment, you can associate a 204 status and a 
null representation.

best regards,
Thierry Boileau

> For pragmatic reasons, unless your application only operates over a 
> network you configure and control, with clients you configure and 
> control, I'd avoid customizing status codes.  Browsers, HTTP 
> libraries, proxies, and higher-layer switches may behave in undefined 
> ways when they encounter non-standard codes -- even though they really 
> should behave politely and largely respect the first digit of the code.
>
> Here, I would either return 204 as Erik suggests, or return 200 with 
> an empty entity, e.g. an empty document or textual message.  Probably 
> the latter, as 204 still confuses some browser-based client libraries 
> and I get a bit tired of explaining what 204 does.
>
> That all said, I think what you did should have worked.  So I wonder 
> if you didn't hit one of these undefined intermediary behavior issues, 
> and/or maybe a Restlet bug.  Which HTTP server connector are you 
> using, and which client are you using to test?  Then I can set it up 
> to verify.
>
> On Tue, Dec 9, 2008 at 9:58 PM, <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     If I change 299 to any 400-level or 500-level code, for example,
>     499, then it works fine. Does anyone know why?
>
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=982125

Reply via email to