true, however - triggering alternate response codes requires either
deploying server side code or modifying the web server config.
The former is contrary to the requirement to deployable via flat files
and a directory structure alone (that is, a provider doesn't need to
write code to do this)
The latter is challenging (trivially so) given the diversity of web
servers and likely reluctance of an admin to modify their
configurations.
Additionally, is it appropriate to apply new semantics to codes that
already have meaning? As a browser I know that 404 means something
isn't there or 403 means I'm not allowed in, but if I start using 204
or 400 codes to indicate something other than exactly what the
designers intended, we run the risk of ambiguity in client side
interpretation, a normal browser might interpret it one way (remember
we're supposed to be human accessible as well) while our client tools
interpret it another.
We should use response codes exactly as intended by the original
authors and express our specific semantics through different
mechanisms (where they aren't 100% equal with RFC2616 and meaning is
completely unambiguous to all consumers).
On May 23, 1:43 am, Krishna Sankar <
ksanka...@gmail.com> wrote:
> Folks,
> Couple of points:
>
> a) Not understood is 400-Bad request. Which is not the same as 404.
> b) 404 is fine if there is no resource, which means the server
> understood what is needed, but what is needed is not available.
> c) BTW, 204 no content is also possible which says there is nothing to
> return.
> d) The difference between 2xx and 4xx is that 4xx is an error path
> while 2xx is a normal path. So 2xx is a better choice for dealing with known
> unknowns while 4xx is for unknown unknowns.
>
> Cheers
> <k/>
>
> On 5/22/10 Sat May 22, 10, "James Urquhart" <
jurquh...@yahoo.com> wrote:
>
>
>
> > After thinking about it for a bit, 404 is OK, but--as Sam hints--it lacks
> > semantics. 404 could be interpreted as both "I have no clue what you are
> > talking about" and "oops, I should have an answer, but the file is now
> > missing", if I understand correctly. The reaction to the response might differ
> > significantly, depending on the use case. (E.g. I might strike the respondent
> > from future requests in the former case, while retrying repeatedly in the
> > latter).
>
> > Then again, my knowledge of HTML codes is pretty elementary--almost
> > kindegarten...
>
> > James
>