toplisek

Well-Known Member
Jan 7, 2010
260
20
68
I have set GZIP validation and need to know if this can be executed inside terminal as Linux command:
curl -X HEAD -I -sH 'Accept-encoding: gzip' Example Domain | grep content-encoding
curl -X HEAD -I -sH 'Accept-encoding: br' Example Domain | grep content-encoding
 
Last edited by a moderator:

toplisek

Well-Known Member
Jan 7, 2010
260
20
68
I have tested and it is without any result for the above query inside account.
 

ecartz

Member
Oct 23, 2021
10
4
3
United States
cPanel Access Level
Root Administrator
curl -X HEAD -I -sH 'Accept-encoding: gzip' Example Domain | grep -i content-encoding
curl -X HEAD -I -sH 'Accept-encoding: br' Example Domain | grep -i content-encoding

The header is Content-Encoding, so you need to use grep -i to get a match with content-encoding.

The easy way to diagnose something like this is to simply remove the pipe to grep part. Then you get feedback like
HTTP/1.1 200 OK
Content-Encoding: gzip
Accept-Ranges: bytes
Age: 333888
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Mon, 15 Aug 2022 05:17:11 GMT
Etag: "3147526947"
Expires: Mon, 22 Aug 2022 05:17:11 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECS (chb/0286)
X-Cache: HIT
Content-Length: 648
and it is obvious that content-encoding is not matching Content-Encoding.