服务器响应终端线分析。响应行的最后一部分是什么? [英] Server response terminal line analysis. What is the last part on the response line?
问题描述
以下是我的Django开发服务器运行的终端的部分屏幕截图,服务器正在响应HTTP请求:
The following is a partial screenshot of the terminal where my Django development server runs in and were the server is responding to an HTTP request:
据我所知,屏幕上的一行包含以下内容信息:
As far as I know a line from the screen contains the following information:
[日期
时间
]请求方法
文件路径
HTTP协议版本
HTTP状态代码
PID(进程ID)
这是否正确?如果是这样,只要屏幕上显示以下响应行,某个行的响应的 PID
是否已终止?
Is this correct? If so, has the PID
of the response of a certain line terminated as soon as the following response line is shown on the screen?
推荐答案
最后一部分表示发送回客户端的对象的大小。这是标准的 Apache日志格式文档中的详细信息:
The last part represents the size of the object sent back to the client. This is the detailed in standard Apache log format documentation:
最后一部分表示返回给客户端的对象的大小,
不包括响应头。如果没有内容返回到
客户端,则此值将为 - 。
The last part indicates the size of the object returned to the client, not including the response headers. If no content was returned to the client, this value will be "-".
补充:在我运行的Django开发服务器中,如果服务器以状态响应,则说明
0
代码301
最后一部分只会记录正文的大小和不包括标题。由于 301
是永久重定向;它没有身体。你看到 0
而不是 -
的原因是可以在日志格式字符串中配置。
The last part will only log the size of the body and does not include the headers. Since 301
is a permanent redirect; it has no body. The reason you are seeing 0
and not -
is configurable at the log format string.
默认格式字符串为%h%l%u%t \%r \%> s%b
;如果用%B
替换%b
,它将记录 0 $ c $对于那些没有正文的请求,c>而不是
-
。
The default format string is "%h %l %u %t \"%r\" %>s %b"
; if you replace %b
with %B
, it will log 0
instead of -
for those requests that have no body.
这篇关于服务器响应终端线分析。响应行的最后一部分是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!