Apache 2.2.2对HEAD请求的响应 [英] Apache 2.2.2 response on HEAD requests

查看:164
本文介绍了Apache 2.2.2对HEAD请求的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎Apache在发送对HEAD请求的响应时坚持要删除"Content-Length"标头.

Seems that Apache insists on removing the "Content-Length" header when sending a response to a HEAD request.

是否可以配置它(或用PHP编写代码)以发送"Content-Length:0"以获得此类响应?

Is there a way to configure it (or code it in PHP) to send "Content-Length: 0" for such responses?

出于某种奇怪的原因,它破坏了客户端(不受我的控制).

For some weird reason it breaks the client (which is not under my control).

推荐答案

要看的一件事是mod_filter配置.在modules/http/http_filters中查找. Apache默认发送Content-Length,您的主机或环境可能已禁用.

One thing to look at would be mod_filter config. Look in modules/http/http_filters. Apache sends Content-Length by default, your host or environment may have disabled.

serverfault 上,您可能会因此而感到幸运.

You might have better luck with this over at serverfault.

这篇关于Apache 2.2.2对HEAD请求的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆