From dd9fa553a57bd55c0f807f2e0e694e93be6f83fc Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 1 Mar 2021 23:30:22 +0530 Subject: [PATCH] Fix time format in headers. The hour should be in 2 digit format while "G" doesn't add leading zero in case of single digit. --- src/Middleware/GlideMiddleware.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Middleware/GlideMiddleware.php b/src/Middleware/GlideMiddleware.php index 5f3adba..4a951af 100644 --- a/src/Middleware/GlideMiddleware.php +++ b/src/Middleware/GlideMiddleware.php @@ -315,9 +315,9 @@ protected function _withCacheHeaders($response, $cacheTime, $modifiedTime) return $response ->withHeader('Cache-Control', 'public,max-age=' . $maxAge) - ->withHeader('Date', gmdate('D, j M Y G:i:s \G\M\T', time())) - ->withHeader('Last-Modified', gmdate('D, j M Y G:i:s \G\M\T', (int)$modifiedTime)) - ->withHeader('Expires', gmdate('D, j M Y G:i:s \G\M\T', $expire)); + ->withHeader('Date', gmdate('D, j M Y H:i:s \G\M\T', time())) + ->withHeader('Last-Modified', gmdate('D, j M Y H:i:s \G\M\T', (int)$modifiedTime)) + ->withHeader('Expires', gmdate('D, j M Y H:i:s \G\M\T', $expire)); } /**