[英]apache mod_headers Date: Header
Folks, Need to convert the following request header to a different format: 亲爱的,需要将以下请求标头转换为其他格式:
RequestHeader set Date "%{TIME_WDAY}e"
The %t variable looks like : %t变量如下所示:
t=1367272677754275
Would like the Date= to look like: 希望Date =看起来像:
Date: Tue, 27 Mar 2007 19:44:46 +0000
How is this done? 怎么做?
Thanks! 谢谢!
You cannot do that with the documented functionality of mod_headers
. 您不能使用已记录的
mod_headers
功能来做到这mod_headers
。 This module only supports the follwing variables (from the doc ): 该模块仅支持以下变量(来自doc ):
%t The time the request was received in Universal Coordinated Time since the epoch (Jan. 1, 1970) measured in microseconds. The value is preceded by t=.
%D The time from when the request was received to the time the headers are sent on the wire. This is a measure of the duration of the request. The value is preceded by D=. The value is measured in microseconds.
%{FOOBAR}e The contents of the environment variable FOOBAR.
%{FOOBAR}s The contents of the SSL environment variable FOOBAR, if mod_ssl is enabled.
Unless you continually want to set an environment variable to your current date and pull it in using mod_env
, I suggest you use mod_rewrite
. 除非您一直想将环境变量设置为当前日期并使用
mod_env
环境变量拉mod_env
, mod_env
建议您使用mod_rewrite
。
正确的答案是一个mod_headers.c补丁,用于添加AWS和GCS所需的其他身份验证信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.