Apache2.4 和 AEM 和 Json 编码 + gzip

Apache2.4 and AEM and Json encoding+gzip

提问人:Rakesh 提问时间:11/19/2020 最后编辑:Rakesh 更新时间:11/21/2020 访问量:298

问:

从Apache2.2移动到Apache2.4和AEM dispatcher 4.3.3后,编码下方缺少Json文件,如果我使用locationmatch为json文件设置标题,则会出现标题。JSON有deflate条目,但这被忽略了。

AddOutputFilterByType DEFLATE 应用程序/json

看起来像一个 0KB 的文件

不同:接受编码 内容编码:gzip

2.2

 Mark bundle as not supporting multiuse
HTTP/1.1 200 OK
-\ Date: Wed, 18 Nov 2020 19:25:42 GMT
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Cache-Control: no-cache, no-store, max-age=0
X-Content-Type-Options: nosniff
Expires: -1
Vary: Accept-Encoding
Content-Encoding: gzip
X-XSS-Protection: 1; mode=block
Content-Length: 22
Content-Type: application/json;charset=iso-8859-1
Content-Language: en

2.4

 HTTP/1.1 200 OK
 Date: Wed, 18 Nov 2020 19:41:55 GMT
 Server: Apache
 Strict-Transport-Security: max-age=31536000; includeSubDomains
 X-Frame-Options: SAMEORIGIN
 Content-Security-Policy: frame-ancestors 'self'
 Cache-Control: no-cache, no-store, max-age=0
 X-Content-Type-Options: nosniff
 Expires: -1
 X-XSS-Protection: 1; mode=block
 Content-Length: 2
 Content-Type: application/json;charset=iso-8859-1
 Content-Language: en
json apache aem mod-deflate

评论

0赞 Rakesh 11/22/2020
将文件大小增加到 4KB 回购了 json 文件的编码,因此 0 kb 文件大小是问题所在。我无法在 Apache2.4 文档上找到任何有关文件大小限制mod_deflate文档。
0赞 Rakesh 12/11/2020
这是 Apache 2.4 的一个功能mod_defalte如果你查看源代码,它提到小尺寸压缩的文件被禁用。

答: 暂无答案