1

Json file are missing below encoding once moved from Apache2.2 to Apache2.4 and AEM dispatcher 4.3.3, header appears if i set header for json files with locationmatch. deflate entry is there for json but this is ignored.

AddOutputFilterByType DEFLATE application/json

looks like it a 0kb file

Vary: Accept-Encoding Content-Encoding: 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
Rakesh
  • 35
  • 5
  • increasing the file size to 4KB bought back the encoding on json file , so 0 kb file size is the issue . I am not able to find any document regarding file size limit on mod_deflate Apache2.4 documentaion. – Rakesh Nov 21 '20 at 19:36
  • This is a feature of Apache 2.4 if you look into mod_defalte source code it mentions that files that are small in size compression is disabled. – Rakesh Dec 10 '20 at 19:42

0 Answers0