Re: Status code questions

On 20.01.2011 03:10, Nathan wrote:
> Hi All,
>
> Two questions wrt the usage of status codes with certain methods:
>
> 1: Can a server return 301/302/307 in response to a DELETE?
> (I've previously assumed "no" as moved would indicate no longer present,
> nothing to delete) - but still unsure.

I'm pretty sure some servers do that (when redirecting to the 
"canonical" URI).

> 2: According to rule 2 of [1] ""If the response status code is 204, 206,
> or 304 and the request method was GET or HEAD"" - I'm wondering, under
> what circumstances would you ever use GET or HEAD with 204 No Content?

Personally I wouldn't (and use 200 with content-length 0). But the spec 
still needs to say how it should be treated...

Best regards, Julian

Received on Thursday, 20 January 2011 12:58:14 UTC