W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2011

Generic semantics for the 400 status code

From: Mark Nottingham <mnot@mnot.net>
Date: Fri, 15 Jul 2011 22:53:09 +1000
Message-Id: <E7DE53B9-C374-4C9B-81D2-1F35BFCC174F@mnot.net>
To: HTTP Working Group <ietf-http-wg@w3.org>
When people have error states that don't cleanly fit into an existing status code, they're often encouraged to use 400 or 500, depending on whether the client or server were at fault, as they're the most "generic" status codes.

500's definition fits this:

> 8.5.1.  500 Internal Server Error
>    The server encountered an unexpected condition which prevented it
>    from fulfilling the request.

However, 400 is much more specific:

> 8.4.1.  400 Bad Request
>    The request could not be understood by the server due to malformed
>    syntax.  The client SHOULD NOT repeat the request without
>    modifications.

I think the 400 definition needs to be broadened, so that people don't invent their own status codes, or misuse existing ones.


The server can or will not process the request, due to a client error (e.g., malformed syntax).

Additionally, I think we should move the caution against retrying the request to the general 4xx section (8.4)*.




* Why is the "If the client is sending data..." section in p2 8.4? Seems like this belongs in p1...

Mark Nottingham   http://www.mnot.net/
Received on Friday, 15 July 2011 12:53:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:10:58 UTC