Live data from Hacker News

HTTP Status 418 – I'm a teapot

developer.mozilla.org

91–100 of 114 posts

Re: HTTP Status 418 – I'm a teapot

#91
post #40

Earlier quoted context omitted.

Any links to APIs that implement a 418 HTTP response code?

If I have anything to do with it, there is a 418 response hidden somewhere. I recall a few internal projects at a previous employer would return 418 if the user managed to royally mess something up as a "wtf, how are you here?!" kind of response. I feel like I am not alone in implementing 'weird' HTTP codes when I get bored / as an easter egg. Pretty sure I also used HTTP 420 at least once.

Unlike 418 I'm a Teapot, 420 Enhance Your Calm is actually a nonstandard HTTP status code. The correct response is 429 Too Many Requests. [1]

[1]: https://datatracker.ietf.org/doc/html/rfc6585#section-4

Re: HTTP Status 418 – I'm a teapot

#92
post #36

Earlier quoted context omitted.

I think for the same reason that Fawlty Towers ended after one season, there should never be a sequel to Office Space. It’s too perfect. It could only go downhill.

No, there must be a sequel; Open Office Space. Office Space is great but the cubicles date it firmly in the 90s.

> Office Space is great but the cubicles date it firmly in the 90s.

I had a cubicle almost identical to the ones in Office Space all the way up to 2011. If I ever had to return to an office, I’d much prefer that over any office desk I’ve had since.

Re: HTTP Status 418 – I'm a teapot

#93
post #43

Earlier quoted context omitted.

.Net seems to have it: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnet...

http.StatusTeapot in Go: https://pkg.go.dev/net/http#pkg-constants 4k+ results on Github: https://github.com/search?utf8=&q=http.StatusTeapot&type=Cod... ; ~600 excluding _test.go files: https://github.com/search?q=http.StatusTeapot+-filename%3A*_...

[deleted]

Re: HTTP Status 418 – I'm a teapot

#94
post #87

Earlier quoted context omitted.

“Uhh ummm no” -code reviewer

Yeah, code reviews definitely killed some of the fun in coding, they are rarely performed with humor.

I generally make it a goal to have a test case with silly enough data to get a comment from a reviewer.

Re: HTTP Status 418 – I'm a teapot

#95
post #46

For those who may not know, this comes from RFC 2324: ""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) , The RFC was published 1 April 1998 (April Fool's Day). There's a long history of humorous RFCs published on 1 April. For example, RFC 1149 "IP over Avian Carriers" https://en.wikipedia.org/wiki/IP_over_Avian_Carriers List of Additional April Fool's RFCs https://en.wikipedia.org/wiki/April_Fools%27_Day_Request…

To toot my own horn, I did an April Fool’s status code RFC: 397 Tolerating, for when a client sends a flawed request, but you’re going to tolerate it because you know what they really meant: https://pastebin.com/TPj9RwuZ

Is this basically "I'm doing the robustness principle but also communicating that I'm judging you"?

Re: HTTP Status 418 – I'm a teapot

#96
post #87

Earlier quoted context omitted.

Yeah, code reviews definitely killed some of the fun in coding, they are rarely performed with humor.

I generally make it a goal to have a test case with silly enough data to get a comment from a reviewer.

I remember reviewing a really long document (> 50 pages) that had in one bullet list the phrase 'Marks and Spencer tandoori chicken sandwich'. The doc was otherwise camera ready and the phrase was obviously there to see if I was in fact reading it

Re: HTTP Status 418 – I'm a teapot

#97
post #25

Earlier quoted context omitted.

I do hope this is a humorous comment

Why? The codes mean things, 418 specifically is a joke, but the entire 4xx range are client errors, i.e. a differently formed request would've succeeded. A perhaps-reasonable suggestion could be to use a 5xx range code that isn't specified. E.g. 555, or 567. (But I'm not sure how it would ever not simply be a 500 - server thought it couldn't happen, it could and did, that's just a plain and simple error isn't it?)

I would be extremely disappointed if a 555 error didn't have something to do with bad timing.

Re: HTTP Status 418 – I'm a teapot

#98

Earlier quoted context omitted.

There are usually buttons next to pump screens and one will mute the sound. Just push them one by one.

the manufacturers caught on to that specific mitigation, and it doesn't work that often in the wild anymore.

Ours have it prominently marked MUTE ->

Re: HTTP Status 418 – I'm a teapot

#100
post #46

Earlier quoted context omitted.

To toot my own horn, I did an April Fool’s status code RFC: 397 Tolerating, for when a client sends a flawed request, but you’re going to tolerate it because you know what they really meant: https://pastebin.com/TPj9RwuZ

Is this basically "I'm doing the robustness principle but also communicating that I'm judging you"?

lol Pretty much! It cites the Robustness Principle.
Post reply on HN