We are trying to migrate our website from smaller provider to Azure, everything went smooth except that we are unable to download files that have more then 2MB when trying to do that we are getting error 400.
Already tried multiple solution for example: https://azureossd.github.io/2020/09/15/unable-to-download-static-content-php-on-azure-app-service-linux/index.html playing with php.ini, testing in any other Azure Linux container is giving the same output, there are no logs about that on Azure.
Here's portion of code that we are using for testing:
$file = "test.exe";
$quoted = sprintf('"%s"', addcslashes(basename($file), '"\\'));
$size = filesize($file);
header('Content-Description: File Transfer');
header('Content-Type: application/*');
header('Content-Disposition: attachment; filename=' . $quoted);
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . $size);
readfile($file);
I compared php and apache settings from the old server and they are practically the same, what am I missing here?