2 comments

[ 2.8 ms ] story [ 17.1 ms ] thread
> In HTTP, the GET method is used to mean "retrieve whatever information (in the form of an entity) identified by the Request- URI." If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

This sentence reminds me of quine computer programs.

> A quine is a computer program which takes no input and produces a copy of its own source code as its only output.

https://en.wikipedia.org/wiki/Quine_(computing)

There was a post about one particular quine the other day on the front page of HN.

But the text about HTTP and process output got me thinking, I am wondering if anyone has written a quine HTTP server.

A web server that would respond to HTTP GET requests with a valid HTTP response containing its own source. Without cheating.

I found one that is close to that, but which does not exactly do that: http://michaelwehar.com/quines/c_prints_javascript.html

Funny 1st April joke from IETF. It proves that humans stay behind the design of RFCs.