Apache 2.2.2 response on HEAD requests

限于喜欢 提交于 2019-12-02 19:43:52

问题


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

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).


回答1:


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.

You might have better luck with this over at serverfault.



来源:https://stackoverflow.com/questions/21574062/apache-2-2-2-response-on-head-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!