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

Mark Nottingham <mnot@mnot.net> Tue, 19 July 2011 13:02 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 [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9E7EA21F85A3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Jul 2011 06:02:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.726
X-Spam-Level:
X-Spam-Status: No, score=-9.726 tagged_above=-999 required=5 tests=[AWL=0.873, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e5hK-PKGLXs8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 19 Jul 2011 06:02:53 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id D3DEB21F870F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 19 Jul 2011 06:02:53 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Qj9wY-0003TX-U6 for ietf-http-wg-dist@listhub.w3.org; Tue, 19 Jul 2011 13:02:34 +0000
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <mnot@mnot.net>) id 1Qj9wP-0003Sh-5c for ietf-http-wg@listhub.w3.org; Tue, 19 Jul 2011 13:02:25 +0000
Received: from mxout-08.mxes.net ([216.86.168.183]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1Qj9wN-0007ey-V3 for ietf-http-wg@w3.org; Tue, 19 Jul 2011 13:02:25 +0000
Received: from chancetrain-lm.mnot.net (unknown [118.209.98.127]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 73ED250A66 for <ietf-http-wg@w3.org>; Tue, 19 Jul 2011 09:02:02 -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: <F0C6395C-9555-49AB-BEE9-055B41DC0160@mnot.net>
Date: Tue, 19 Jul 2011 23:02:01 +1000
Content-Transfer-Encoding: quoted-printable
Message-Id: <3160873A-4B4B-44D1-A7C0-A56D5B72C775@mnot.net>
References: <E7DE53B9-C374-4C9B-81D2-1F35BFCC174F@mnot.net> <F0C6395C-9555-49AB-BEE9-055B41DC0160@mnot.net>
To: HTTP Working Group <ietf-http-wg@w3.org>
X-Mailer: Apple Mail (2.1084)
Received-SPF: pass client-ip=216.86.168.183; 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 1Qj9wN-0007ey-V3 a77c85860516166778a911df704b3b94
X-Original-To: ietf-http-wg@w3.org
Subject: Re: #303: Generic semantics for the 400 status code (also #302)
Archived-At: <http://www.w3.org/mid/3160873A-4B4B-44D1-A7C0-A56D5B72C775@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/11037
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: <E1Qj9wY-0003TX-U6@frink.w3.org>
Resent-Date: Tue, 19 Jul 2011 13:02:34 +0000

I'm not hearing any pushback on this, so assigning for -16.


On 17/07/2011, at 10:54 AM, Mark Nottingham wrote:

> 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>.

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