I know that status code 418 was defined as a April Fools' joke, and "is not expected to be implemented by actual HTTP servers" as is stated on Wikipedia.
But I would be interested if any of you knew of a language/webserver/IDE that supports it.
I was trying on Apache (via php), and obviously it got me an internal error (500). I just like the humor behind it (am not trying to troll here) and would like to know if more than just Emacs implements this.
More precisely: It could be emulated in php for example by doing something like ...
header("HTTP/1.1 418 Whatever text I'd like");
... but do any of you know any actual server software, or language in particular, that implements it natively, where something like the following would not throw a 500, but actually work:
http_response_code(418);
200 OK
there, isn't it? – Woadwaxen404
page directly, you'll get a200 OK
of the error document. But if you try to access a feature that you haven't unlocked on my site, it will respond with a "proper" 418 error code. – AphasicGET /coffee HTCPCP/1.0
or something :p – Aphasicnode.js
does support 418 natively and hisres.send(418)
sends a properI am a teapot
message to go with it! (Which was what I was really looking for) Your answers are great examples none the less, but having server software (apache, nginx, etc.) support this natively is just awesome / what I wanted. Sry for being ambiguous in my question (not a native speaker). But thx for reminding, I will write an answer with that. If Oleg also answers, I will delete mine and accept his! – Woadwaxen