From 50b1e13879eb0b110716f3b14ecff13a0f2b40b1 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 5 Sep 2022 19:05:00 +0200 Subject: [PATCH] - online-update: fix get-kernel.php --- support/online-update/get-kernel.php | 36 +++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/support/online-update/get-kernel.php b/support/online-update/get-kernel.php index c94cfd31..2671dbb3 100644 --- a/support/online-update/get-kernel.php +++ b/support/online-update/get-kernel.php @@ -1,7 +1,7 @@ $last_mod) + { + $last_mod = filectime($kernel); + $last_kernel = $kernel; + } +} + +if (empty($last_kernel)) { # send error header('HTTP/1.0 404 Not Found'); @@ -54,11 +68,11 @@ else # send kernel header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); - header('Content-Disposition: attachment; filename="' . basename($kernel) . '"'); + header('Content-Disposition: attachment; filename="' . basename($last_kernel) . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); - header('Content-Length: ' . filesize($kernel)); - readfile($kernel); + header('Content-Length: ' . filesize($last_kernel)); + readfile($last_kernel); } ?> \ No newline at end of file