mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-65693 files: Honor http HEAD requests for files
This commit is contained in:
parent
800563e415
commit
d46dba32d4
@ -2229,6 +2229,10 @@ function readfile_accel($file, $mimetype, $accelerate) {
|
||||
|
||||
header('Content-Length: '.$filesize);
|
||||
|
||||
if (!empty($_SERVER['REQUEST_METHOD']) and $_SERVER['REQUEST_METHOD'] === 'HEAD') {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($filesize > 10000000) {
|
||||
// for large files try to flush and close all buffers to conserve memory
|
||||
while(@ob_get_level()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user