Satanasov
it seems it is required to terminate handling of image requests at routes below, before the flow control goes back to app.php,
/gallery/image/{image_id}/mini
/gallery/image/{image_id}/medium
/gallery/image/{image_id}/source
since gallery now is extension the extra code in app.php
Code: Select all
$response = $http_kernel->handle($symfony_request);
$response->send();
$http_kernel->terminate($symfony_request, $response);
which handles the request causes the extra payload to be send to client right after the image content -
i observed about 30k with my custom style, it comes from rendering an extension HTML page,
I fixed it in file.php with call to exit() rigth after flush()
Code: Select all
// Try to deliver in chunks
@set_time_limit(0);
if ($fp !== false)
{
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
}
else
{
@readfile($this->image_source);
}
flush();
exit();
to reproduce just comment out the content-type header in file.php and load any image
http:/host/gallery/image/{\d+}/mini in browser