[BUGFIX] Correct invalid last-modified header in HTTP response 52/44852/2
authorMichael Schams <typo3@2015.trash.schams.net>
Sat, 21 Nov 2015 01:38:13 +0000 (12:38 +1100)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 21 Nov 2015 11:04:47 +0000 (12:04 +0100)
Missing space between timestamp and timezone abbreviation added when
EXT:form sends date/time value in HTTP header "Last-Modified:" in
response to AJAX calls (saveAction and loadAction).

This patch corrects the invalid date/time value and makes the HTTP header
RFC2616-conform.

Change-Id: I54974266ca470fb7e579bc33f5ca29fa6c5efee2
Resolves: #71749
Releases: master
Reviewed-on: https://review.typo3.org/44852
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/form/Classes/Controller/WizardController.php

index 34c86f8..abbbf86 100644 (file)
@@ -78,7 +78,7 @@ class WizardController
         $response->getBody()->write(json_encode(['message' => $message]));
         return $response
                 ->withHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT')
-                ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . 'GMT')
+                ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT')
                 ->withHeader('Cache-Control', 'no-cache, must-revalidate')
                 ->withHeader('Pragma', 'no-cache');
     }
@@ -104,7 +104,7 @@ class WizardController
         $response->getBody()->write(json_encode($result));
         return $response
                 ->withHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT')
-                ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . 'GMT')
+                ->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT')
                 ->withHeader('Cache-Control', 'no-cache, must-revalidate')
                 ->withHeader('Pragma', 'no-cache');
     }