Content Types like application/javascript; charset=utf-8 should not trigger a warning.
Matomo's HTTP::sendHttpRequest does not send the required Accept-Encoding header. Standards compliant HTTP servers cannot send compressed output in this case. This change does the compression check by checking for the existence of the correct Vary header. Standards-compliant HTTP servers should send it when compression is possible.
Unfortunately this check does not actually checks for compressed output. Looks like for that it would require another HTTP library that actually supports compressed HTTP responses. With standards compliant HTTP server it should be a good enough check, tho.
Only HTTP/2 server use lowercase HTTP headers. Use capitalised header names for HTTP/1 support. Matomo will make sure that the capitalised header names will work with HTTP/2, too. See https://github.com/matomo-org/matomo/blob/1aec00ff0affa727ef134e230b465091b97e6863/core/Http.php#L1014-L1043
Content Types like
application/javascript; charset=utf-8
should not trigger a warning.Matomo's HTTP::sendHttpRequest does not send the required
Accept-Encoding
header. Standards compliant HTTP servers cannot send compressed output in this case. This change does the compression check by checking for the existence of the correctVary
header. Standards-compliant HTTP servers should send it when compression is possible.Unfortunately this check does not actually checks for compressed output. Looks like for that it would require another HTTP library that actually supports compressed HTTP responses. With standards compliant HTTP server it should be a good enough check, tho.