下面是我的配置。我有一个环境变量,它告诉我,我是什么群集上,这是在X-集群的标题传递。这将返回罚款200或404的响应,但304未修改响应永远不会返回头,虽然它返回其他相应的Apache头。
Here is my configuration. I have an environment variable which tells me what cluster I am on, which is passed as a header in 'X-Cluster'. This returns fine on a 200 or a 404 response, but a 304 Not Modified response never returns the header, even though it returns other appropriate Apache headers.
我如何获得的头一个304响应期间设置?
How do I get the header to be set during a 304 response?
推荐答案阿帕奇明确禁止修改响应头为符合HTTP规范一个304响应。这种类型的响应的名称为未改性。您可以使用Apache的滤波器结构,修改此行为通过编写自定义的模块,或者与可能的mod_perl,但它是最有可能的错误的做法。
Apache explicitly prohibits modifying the response headers in a 304 response for compliance with the http spec. The name of this type of response is "Not modified". You can modify this behavior using Apache's filter architecture, by writing a custom module, or with mod_perl perhaps, but it's most likely the wrong thing to do.
更多推荐
304响应不设置自定义页眉与mod
发布评论