2
我在Ubuntu 10.10(x86)(apt標準包)上使用mod_perl 2,mason和apache 2.2。當我發送HTTP請求到我的服務器時,我得到以下內容:梅森迴應之前和之後的這些數字是什麼意思?
$ 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
我對此有點好奇。這些數字(38和0)是什麼意思?我查看了我的日誌,但是我沒有看到任何有意義的東西,我似乎無法找出Google的最佳搜索詞(如果我錯過了文檔中顯而易見的東西,則很抱歉)。我從telnet獲得相同的結果(但Firefox似乎沒有引發任何錯誤)。
這裏是我的要求的內容(末尾省略空格):
GET /test.html HTTP/1.1
HOST: example.com
和我的腳本(test.html中):提前
% my $ip = $r->connection->remote_ip();
<html><body>Current IP Address: <% $ip %></body></html>
謝謝!
謝謝!這正是我期待的! – 2010-11-22 00:49:03