HTTP Status and Coffee
Exploring HTTP status codes, including the quirky 418 "I'm a teapot" error, as a fun reminder to enjoy the internet's hidden gems. ☕️
Hello, regular readers, and welcome to the new ones!
This is Luis, with the latest issue of my newsletter. I write this newsletter to share my passion for photography, cities, and technology, along with interesting links I find over the week(s). This newsletter will be (as long as possible) free, but if you like to support it feel free to become a paid subscriber (pay what you want), or buy one of my photos.
—
I was thinking about what to write today, either something about cities, code, or something else. Finally, I decided to write about HTTP status codes. I know, it might not be the most exciting topic, but it has it's easter eggs 😉. What does all those statuses with numbers mean? I think we all know some of them, and for sure we all have found, or actually not found, a 404. I know, not the greatest joke.
What about the 418 status code? It's a fun one, it's called "I'm a teapot". It was an April Fools' joke from 1998, and it's still part of the RFC 2324. The status code is defined as: "Any attempt to brew coffee with a teapot should result in the error code '418 I'm a teapot'. The resulting entity body MAY be short and stout." 😂
The RFC 2324 is a fun read for sure. It defines the Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0), and it's a great example of how the internet can be fun. Take for example the Security Considerations section:
Security Considerations
Anyone who gets in between me and my morning coffee should be insecure.
Unmoderated access to unprotected coffee pots from Internet users might lead to several kinds of "denial of coffee service" attacks.
The improper use of filtration devices might admit trojan grounds.
Filtration is not a good virus protection method.
I for sure identify with the first security risk.
And not only does the standard exists in definition. The 418 error code is implemented in programming languages. For example in Python, you can use the http.HTTPStatus
class to get the status code:
import http
print(http.HTTPStatus.IM_A_TEAPOT)
And you will get the output:
<HTTPStatus.IM_A_TEAPOT: 418>
This error message is all around us, go to google.com/teapot and you will get a teapot. Or go to http.cat and you will get a cat with a teapot.
I hope you have enjoyed this little piece of internet history. It's a great reminder to have fun while working on web development, and that this kind of easter eggs are one of the things that makes internet a great place.
Now, I'll go and make some coffee ☕️.
Thanks for reading!
—
About this newsletter
I'm Luis Natera, a software developer, network scientist, and data/cities/tech nerd. I have an interdisciplinary trajectory (architecture -> sociocultural studies -> network science -> software development), you can read more about me and my career here.
This is a weekly newsletter about photography, cities, and software.
Looking for past issues or to subscribe? visit: buttondown.email/natera
Support the newsletter:
This newsletter is free as beer. Share it with your friends, family, colleagues without guilt!
If you want to support it, besides sharing you can:
If you like the content and want to send some love, here are some ideas: