Skip to main content


Ok - I've been told that HTTP 418 belongs in the 400 block because it's the same as requesting a non-existent file. This argument claims that 418 is the same as 404.

I tend to think of 418 as being more analogous to 501. You cannot put coffee in a teapot, which is a statement about the teapot.

#ImportantThoughts #Protocols #HTTP

in reply to silverwizard

You can put coffee in a teapot, though. The rejection is administrative.
in reply to silverwizard

It's like rejecting form data that's of the right type based on validation against the field's semantics. Which would be 400 series.
in reply to ⛅ w chance of bears

@⛅ w chance of bears Which HTTP error code do you think is analogous? 501 feels correct to me, as you're sending valid data, but the server chooses to not implement it. Of course, I'm trying to envision the request. I guess you envision the request as malformed, whereas I see a valid request sent to a place which is not properly set for it?
in reply to silverwizard

A teapot is mechanically a vessel that implements a catch-all "add liquid" or "pour liquid" more-or-less transparently to the actual identity of the liquid (barring extreme properties). When trying to put coffee in a teapot the method is implemented and the data would be valid, except that the teapot czar intervenes with an externally imposed rule which adjudicates that the data is actually invalid because reasons. 403 Forbidden.
in reply to ⛅ w chance of bears

@⛅ w chance of bears This doesn't feel very HTTP to me. There's too much context to be aware of here. This feels like we're into JS/whatnot. HTTP itself feels like it should be less content aware?
in reply to silverwizard

I'm looking at this as a web application returning a response code. HTTP is a protocol; some of the participants of that protocol will be extremely content aware, others less so. The very notion that holding coffee violates a teapot's nature is a philosophical conceit that would be odd for a low awareness system to express in the first place.

On the other hand, I suppose that attempting to french press in a teapot would be my idea of a 500-series teapot error.

in reply to ⛅ w chance of bears

@⛅ w chance of bears So I mean - yeah - I feel like the Pour action should be beverage neutral, but the coffee-pot specific actions will result in the server saying it's not correct.
in reply to silverwizard

@silverwizard I agree, "I'm a teapot" says more about the server (5XX errors) than the request itself (4XX).