Saturday, July 13, 2002
A pleasant surprise from Slashdot
I'm working on a project for a client, and I need to see exactly what transpires between a web browser and a web server, since what I've written isn't exactly working correctly.
So towards that end, I've written a program that acts as a very simple web proxy server—all it does is pass the data on to a real web proxy server, but it also dumps everything to disk so I can examine the traffic (it's not enough to look at the pages, I need to see what else is going on in HTTP).
As a test, I went to Slashdot. As expected, the program saved all the sessions, didn't crash and didn't leave any zombie processes. And then going through the saved files when I found out that there's an Easter Egg in the pages Slashdot send out.
You normally can't see this, even if you view the source of the
page, since the Easter Eggs aren't part of the page. They're in the header
portion of the transfer (not to be confused with the <HEAD>
section of an HTML
page—there is a difference). For instance, on the HTML pages (and it's
only sent with pages that are text) on one page I found:
HTTP/1.1 200 OK
Date: Sat, 13 Jul 2002 10:08:51 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.25 mod_gzip/1.3.19.1a
X-Powered-By: Slash 2.003000
X-Fry: That's it! You can only take my money for so long before you take it all and I say enough!
Cache-Control: no-cache
Pragma: no-cache
Connection: close
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 10760
And on another one I found:
HTTP/1.1 200 OK
Date: Sun, 30 Jun 2002 02:11:36 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.25 mod_gzip/1.3.19.1a
X-Powered-By: Slash 2.003000
X-Bender: OK, but I don't want anyone thinking we're robosexuals.
Last-Modified: Mon, 03 Dec 2001 17:55:42 GMT
ETag: "33673f-13e-3c0bbc9e"
Accept-Ranges: bytes
Content-Length: 318
Connection: close
Content-Type: text/plain
And yet another one:
HTTP/1.1 200 OK
Date: Sat, 13 Jul 2002 10:09:23 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.25 mod_gzip/1.3.19.1a
X-Powered-By: Slash 2.003000
X-Fry: I'm never gonna get used to the thirty-first century. Caffeinated bacon?
Cache-Control: no-cache
Pragma: no-cache
Connection: close
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 18303
It seems to be quotes from Futurama, but I can't be entirely sure, as I've never seen Futurama. But still, it's neat finding stuff like this buried in programs (or websites as the case may be).