在梅森响应之前和之后这些数字是什么意思?

Joe*_*ane 2 perl http apache2 mod-perl mason

我在Ubuntu 10.10(x86)上使用mod_perl 2,mason和apache 2.2(来自apt的标准包).当我向服务器发送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
Run Code Online (Sandbox Code Playgroud)

我对此有点好奇.这些数字(38和0)是什么意思?我查看了我的日志,但我没有看到任何有意义的内容,我似乎无法找出谷歌的最佳搜索短语(如果我遗漏了文档中明显的内容,我很抱歉).我从telnet获得相同的结果(但Firefox似乎没有抛出任何类型的错误).

这是我的请求的内容(在末尾省略空格):

GET /test.html HTTP/1.1
HOST: example.com
Run Code Online (Sandbox Code Playgroud)

和我的脚本(test.html):

% my $ip = $r->connection->remote_ip();
<html><body>Current IP Address: <% $ip %></body></html>
Run Code Online (Sandbox Code Playgroud)

提前致谢!

fri*_*edo 5

这些数字是分块编码的边界分隔符.(注意Transfer-Encoding响应中得到的标题的值.)

38表示第一个块中有38个(十六进制)= 56个字节.0表示没有更多的块.