fix(lambda-web): write the day with two digits in the date header of the platform pages (#7172)

* fix(lambda-web): write the day with two digits in the date header of the platform pages

The platform pages and the 414 write the day of their date header with
two digits on AWS, as in Sun, 01 Nov 2026. RFC_1123_DATE_TIME writes 1.

* refactor(lambda-web): write the Date header of the metadata server with platformDate
This commit is contained in:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-11-01 09:16:47 -04:00
1 parent e6b1f54cb4
commit c8dec86997
5 files changed
+19 -12

No files matched your search

@@ -46,6 +46,12 @@ class LambdaWebErrorPagesTest {
assertEquals("Thu, 15 Oct 26 23:32:32 GMT", LambdaWebErrorPages.edgeDate(Instant.parse("2026-10-15T23:32:32Z")));
}
@Test
void platformDateHasATwoDigitDay() {
assertEquals("Sun, 01 Nov 2026 02:33:33 GMT",
LambdaWebErrorPages.platformDate(Instant.parse("2026-11-01T02:33:33Z")));
}
private static int length(LambdaWebErrorPages.Page page) {
return LambdaWebErrorPages.html(page, REQUEST_ID).getBytes(StandardCharsets.UTF_8).length;
}