Subject: Re: NEW: value space of status codes [#213]

From: Mark Nottingham <[email-masked]>
Date: Thu, 8 Jul 2010 08:43:31 +1000

See also
 http://groups.google.com/group/http-archive-specification/browse_thread/thread/59132f7e964a1e02?hl=en_US

Do we need a space (e.g., 0xx) for private use?

On 30/06/2010, at 3:34 AM, Julian Reschke wrote:

> On 29.06.2010 19:05, Mark Nottingham wrote:
>> p1 defines HTTP status codes as "a 3-digit integer result code" with the following value space:
>> 
>> The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:
>> 
>> 	• 1xx: Informational - Request received, continuing process
>> 	• 2xx: Success - The action was successfully received, understood, and accepted
>> 	• 3xx: Redirection - Further action must be taken in order to complete the request
>> 	• 4xx: Client Error - The request contains bad syntax or cannot be fulfilled
>> 	• 5xx: Server Error - The server failed to fulfill an apparently valid request
>> 
>> The BNF, however, allows other values;
>> 
>> Status-Code = 3DIGIT
> 
> One might consider "3DIGIT" as a rule for parsers (thus, in P1), and the first digits as a semantical constraint (thus, P2).
> 
>> IANA has asked what the status of codes is outside of this range; e.g., is a 0xx status code reserved, unregistered, or just not allowed? Likewise for 6xx (used by some implementations for local status codes) and upwards.
> 
> Not allowed in HTTP/1.1.
> 
>> Also, should the value space be defined in p1 or p2?
> 
> In P2, IMHO. Maybe move part of P1, Section 5.1.1 into P2, Section 4?
> 
> Best regards, Julian
> 

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

---

From: "Roy T. Fielding" <[email-masked]>
Date: Wed, 7 Jul 2010 16:24:48 -0700

> Do we need a space (e.g., 0xx) for private use?

That would inevitably become another X-prefix style of disaster.

I have written tools that used 6xx and 9xx internally, but I wouldn't
want that standardized.  0xx are sometimes used to return errno in
library calls.

....Roy

---

From: Mark Nottingham <[email-masked]>
Date: Thu, 8 Jul 2010 10:13:45 +1000

That's roughly what I mean by private use -- i.e., don't ever serialise on the wire.

---

From: Julian Reschke <[email-masked]>
Date: Thu, 08 Jul 2010 10:57:05 +0200

> That's roughly what I mean by private use -- i.e., don't ever serialise on the wire.

If it's never on the wire, do we really care?

If APIs need a value range that is guaranteed to be never used in 
HTTP/1.1, simply pick values that can't be put on the wire, such as < 0 
or > 999.

Best regards, Julian

---

From: Willy Tarreau <[email-masked]>
Date: Thu, 8 Jul 2010 11:03:35 +0200

On Thu, Jul 08, 2010 at 10:57:05AM +0200, Julian Reschke wrote:
> HTTP/1.1, simply pick values that can't be put on the wire, such as <
> 0 or > 999.

or maybe simply add the precision that codes < 100 and >= 600 will never
be emitted over the wire ?

Regards,
Willy

---

From: Julian Reschke <[email-masked]>
Date: Thu, 08 Jul 2010 11:37:41 +0200

On 08.07.2010 11:03, Willy Tarreau wrote:
>> HTTP/1.1, simply pick values that can't be put on the wire, such as<
>> 0 or>  999.
>
> or maybe simply add the precision that codes<  100 and>= 600 will never

I really don't see the benefit. Maybe we want to use them in HTTP/1.2?

What's wrong with < 0 or > 999?

Best regards, Julian

---

From: Willy Tarreau <[email-masked]>
Date: Thu, 8 Jul 2010 11:49:39 +0200

> What's wrong with < 0 or > 999?

Nothing, I'm just suggesting to document what is currently practiced. If
some products already use 6xx to report internal statuses, either we enforce
999 and we remind them that they don't comply to the new spec, or we clarify
the spec to consider what's already deployed, meaning 1xx-5xx on the wire
and the rest for internal use. I personally have no preference, I've never
used internal codes within the 0..999 range myself, but it's nice not to be
too much aggressive against existing products' practices ;-)

Regards,
Willy

---

From: Yves Lafon <[email-masked]>
Date: Thu, 8 Jul 2010 07:22:12 -0400 (EDT)

> That's roughly what I mean by private use -- i.e., don't ever serialise 

Then define a "reserved set" pretty much like unroutable IP address 
ranges. Something like 9xx.

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves

---

From: David Morris <[email-masked]>
Date: Thu, 8 Jul 2010 07:10:37 -0700 (PDT)

> What's wrong with < 0 or > 999?

Parsing rules are different for the character string. Can't for example
enforce exactly 3 numeric digits.

Like private IP address space, I see potential value and little harm for
reserving status code values for private use. Perhaps just 0xx, 8xx, 9xx?

Dave Morris