I am using mod_perl 2, mason, and apache 2.2 on Ubuntu 10.10 (x86) (standard packages from apt). When I send a HTTP request to my server, I get the following:
$ nc localhost 80 < ~/Desktop/test.http
HTTP/1.1 200 OK
Date: Mon, 22 Nov 2010 00:32:02 GMT
Server: Apache/2.2.16 (Ubuntu)
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html
38
<html><body>Current IP Address: 127.0.0.1</body></html>
0
I am a bit curious about this. What do those numbers (38 and 0) mean? I have looked in my logs, but I don't see anything meaningful and I can't seem to figure out the best search phrase for Google (and sorry if I am missing something obvious from the docs). I get the same result from telnet (but Firefox doesn't seem to throw any sort of error).
Here is the content of my request (omitting the whitespace at the end):
GET /test.html HTTP/1.1
HOST: example.com
and my script (test.html):
% my $ip = $r->connection->remote_ip();
<html><body>Current IP Address: <% $ip %></body></html>
Thanks in advance!