Apache is not sending 304 response (if mod_deflate and AddOutputFilterByType is enabled)

后端 未结 4 1990
渐次进展
渐次进展 2020-12-02 21:05

I have added the following line in my Apache httpd.conf: -

AddOutputFilterByType DEFLATE text/html text/css application/javascript application/x-javascript a         


        
4条回答
  •  再見小時候
    2020-12-02 21:19

    This is a known bug in Apache. See Apache bug #45023, and summary of Apache 304 etags and mod_deflate.

    Rebuilding from svn will fix the issue. The resolution was to revert the change that appended "-gzip" to the etag. However, there are associated HTTP compliance problems.

    If you can't rebuild Apache, there is a suggested runtime configuration workaround in the bug report:

     RequestHeader  edit "If-None-Match" "^\"(.*)-gzip\"$" "\"$1\""
     Header  edit "ETag" "^\"(.*[^g][^z][^i][^p])\"$" "\"$1-gzip\""
    

提交回复
热议问题