#303: Generic semantics for the 400 status code (also #302)

Mark Nottingham <mnot@mnot.net> Sun, 17 July 2011 00:56 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 4949121F8569 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 16 Jul 2011 17:56:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.672
X-Spam-Status: No, score=-9.672 tagged_above=-999 required=5 tests=[AWL=0.927, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id KI9v6mweWoNz for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 16 Jul 2011 17:56:32 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org []) by ietfa.amsl.com (Postfix) with ESMTP id 29A2D21F8565 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 16 Jul 2011 17:56:28 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1QiFdd-0004pa-Gv for ietf-http-wg-dist@listhub.w3.org; Sun, 17 Jul 2011 00:55:17 +0000
Received: from maggie.w3.org ([]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <mnot@mnot.net>) id 1QiFdR-0004oZ-TE for ietf-http-wg@listhub.w3.org; Sun, 17 Jul 2011 00:55:05 +0000
Received: from mxout-08.mxes.net ([]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1QiFdQ-0003jL-9a for ietf-http-wg@w3.org; Sun, 17 Jul 2011 00:55:05 +0000
Received: from chancetrain-lm.mnot.net (unknown []) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 3D75350A5D for <ietf-http-wg@w3.org>; Sat, 16 Jul 2011 20:54:42 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Apple Message framework v1084)
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <E7DE53B9-C374-4C9B-81D2-1F35BFCC174F@mnot.net>
Date: Sun, 17 Jul 2011 10:54:39 +1000
Content-Transfer-Encoding: quoted-printable
Message-Id: <F0C6395C-9555-49AB-BEE9-055B41DC0160@mnot.net>
References: <E7DE53B9-C374-4C9B-81D2-1F35BFCC174F@mnot.net>
To: HTTP Working Group <ietf-http-wg@w3.org>
X-Mailer: Apple Mail (2.1084)
Received-SPF: pass client-ip=; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1QiFdQ-0003jL-9a 541b8900d1024d643c5b5876e7d15d44
X-Original-To: ietf-http-wg@w3.org
Subject: #303: Generic semantics for the 400 status code (also #302)
Archived-At: <http://www.w3.org/mid/F0C6395C-9555-49AB-BEE9-055B41DC0160@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/10952
X-Loop: ietf-http-wg@w3.org
Sender: ietf-http-wg-request@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Resent-Message-Id: <E1QiFdd-0004pa-Gv@frink.w3.org>
Resent-Date: Sun, 17 Jul 2011 00:55:17 +0000

On 15/07/2011, at 10:53 PM, Mark Nottingham wrote:

> 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.
> E.g.,
> """
> The server can or will not process the request, due to a client error (e.g., malformed syntax).
> """

This was logged as <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/303>.

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

This is now #302 <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/302> (editorial)

Mark Nottingham   http://www.mnot.net/