mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Fix #1692 Remove Content-Length header on images (HTTP2 compat)
Content-Length header should be the body size after compression (if enabled) and not the size of the original body. In HTTP1.1 such invalid value is not problematic but in HTTP2 it prevents images to display.
This commit is contained in:
committed by
Pierrick Le Gall
parent
e909cb19bb
commit
1b66ca73f9
3
i.php
3
i.php
@@ -349,7 +349,6 @@ function send_derivative($expires)
|
||||
{
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s', $expires).' GMT');
|
||||
}
|
||||
header('Content-length: '.$fstat['size']);
|
||||
header('Connection: close');
|
||||
|
||||
$ctype="application/octet-stream";
|
||||
@@ -619,4 +618,4 @@ if ($logger->severity() >= Logger::DEBUG)
|
||||
'mem_usage' => function_exists('memory_get_peak_usage') ? round( memory_get_peak_usage()/(1024*1024), 1) : '',
|
||||
'timing' => $timing,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user