Re: Reviving discussion on error code 451

On 2014-12-17 09:46, Willy Tarreau wrote:
> On Wed, Dec 17, 2014 at 09:15:39AM +0100, Stephane Bortzmeyer wrote:
>> On Wed, Dec 17, 2014 at 08:27:53AM +0100,
>>   Willy Tarreau <w@1wt.eu> wrote
>>   a message of 34 lines which said:
>>
>>> Let's pick 425 and fill one hole instead of increasing fragmentation.
>>
>> What is the problem with "fragmentation"? We never aggregate (handle
>> together) status codes and there is no "range" of codes who could be
>> treated as an aggregate in
>> <http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml#http-status-codes-1>.
>
> I'd turn the question the other way around : why pick a random code in
> the middle of the 4xx range ? It's much easier for implementations to
> keep clean and maintainable code when things are a bit tidy than when
> it's completely random . For instance, when dealing with messages
> associated to error codes, it's easier to know that you covered all
> those you implemented when you see that 400-431 all have a message
> associated than when you have to carefully check them all one at a
> time against a list. Of course there's nothing critical, it's just
> that it doesn't seem to make much sense to start with a random value
> far away from the previously assigned ones.

I agree that we shouldn't pick random codes, and that in general we 
should use the first available one.

That being said, "451" was *not* randomly chosen (*), and changing the 
code now, while it already has support, seems to be unnecessary to me.

Best regards, Julian

(*) <https://en.wikipedia.org/wiki/Fahrenheit_451>

Received on Wednesday, 17 December 2014 10:34:44 UTC