mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-24 22:25:09 +03:00
Send Accept-Encoding header in integrity test?
This commit is contained in:
parent
61ebcb6ed4
commit
843b69bfa8
1 changed files with 3 additions and 1 deletions
|
|
@ -57,6 +57,7 @@ abstract class Integrity
|
|||
*/
|
||||
echo "<h3>gzip encoded</h3>";
|
||||
$response = $HTTP->doRequest('HEAD', $uri . $file . '.gz');
|
||||
// $response = $HTTP->doRequest('HEAD', $uri . $file, null, ['Accept-Encoding: gzip']);
|
||||
echo '<details><summary>Status: ' . $response->status . '</summary><pre>' . \print_r($response->headers, 1) . '</pre></details>';
|
||||
$size = \filesize(APP_VERSION_ROOT_PATH.$file . '.gz');
|
||||
if ($size == intval($response->getHeader('content-length'))) {
|
||||
|
|
@ -71,7 +72,8 @@ abstract class Integrity
|
|||
}
|
||||
|
||||
echo "<h3>brotli encoded</h3>";
|
||||
$response = $HTTP->doRequest('HEAD', $uri . $file . '.br');
|
||||
$response = $HTTP->doRequest('HEAD', $uri . $file, null, ['Accept-Encoding: br']);
|
||||
// $response = $HTTP->doRequest('HEAD', $uri . $file . '.br');
|
||||
echo '<details><summary>Status: ' . $response->status . '</summary><pre>' . \print_r($response->headers, 1) . '</pre></details>';
|
||||
$size = \filesize(APP_VERSION_ROOT_PATH.$file . '.br');
|
||||
if ($size == intval($response->getHeader('content-length'))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue