Apache Httpd LogFormat可以记录"预告片行"?

时间:2017-01-22 22:31:51

标签: apache logging apache2

我已阅读有关为位于此处的Apache HTTPD服务器配置自定义LogFormat的文档http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats

在此表中存在这两个条目:

%{VARNAME}^ti   The contents of VARNAME: trailer line(s) in the request sent to the server.
%{VARNAME}^to   The contents of VARNAME: trailer line(s) in the response sent from the server. 

我试图找出这两个意味着什么,到目前为止我一直不走运。这两个意味着什么?从请求/响应中记录什么?

1 个答案:

答案 0 :(得分:1)

某些类型的HTTP请求或响应在技术上可能具有“预告片” - 即包含在消息末尾而不是开头的标头。例如:

HTTP/1.1 200 OK
Trailer: Expires

<response content>

Expires: <date>

%{}^ti%{}^to日志格式可用于记录这些预告片。

不确定这是为了什么?别担心,你并不孤单。大多数HTTP客户端和服务器(包括Web浏览器)不支持或使用预告片。除非您的应用程序专门使用HTTP预告片,否则您可以放心地忽略它。