Repository navigation
Fix Expires test dates; check for a mismatched weekday - #222
Merged
Merged
Conversation
freshness-expires-ansi-c sent "Thu Aug 8 02:01:18 2050", but 8 Aug 2050 is a Monday (the Thursday is 18 Aug, which the other Expires tests use). A cache that checks the day name against the date rejects the header, so the test reports a failure that has nothing to do with asctime parsing. Every other weekday-prefixed date in tests/ and test-engine/ matches its date; this was the only one that didn't. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Some caches validate the day name against the date and discard the header when they differ. The specification doesn't ask recipients to do that, so this is a check, not a conformance test: it records whether a cache still reuses a response with "Expires: Fri, 18 Aug 2050 02:01:18 GMT" (18 Aug 2050 is a Thursday). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both values were 11 hours late, which looks like a timezone slip when they were computed. 2^31 seconds is Tue, 19 Jan 2038 03:14:08 GMT, not 14:14:08, so freshness-expires-32bit wasn't testing the 32-bit boundary. The far-future value is 9999999999 (the largest ten-digit timestamp), Sat, 20 Nov 2286 17:46:39 GMT, not Sun, 21 Nov 04:46:39. Weekdays updated to match. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Someone reported that one of the
Expirestests uses a date whose day-of-week doesn't match, and that it throws an implementation off. This fixes that and a related slip, and adds a check for the behaviour itself.freshness-expires-ansi-csentThu Aug 8 02:01:18 2050, but 8 Aug 2050 is a Monday. It's nowMon. I checked every other weekday-prefixed date intests/andtest-engine/against a calendar; this was the only mismatch.freshness-expires-wrong-weekday(kind: 'check') sendsExpires: Fri, 18 Aug 2050 02:01:18 GMT(a Thursday) and records whether the cache still reuses the response. The specification doesn't ask recipients to validate the day name, so this isn't a conformance test.freshness-expires-32bitused14:14:08; 2^31 seconds is03:14:08GMT, so it wasn't hitting the 32-bit boundary.freshness-expires-far-futurewas 11 hours late in the same way (it's now 9999999999,Sat, 20 Nov 2286 17:46:39 GMT). Both weekdays/days updated to match.npm run validateandnpm run lintpass. I haven't run the changed tests against a cache, so results for existing caches may shift (the ansi-c fix in particular) and the new check hasn't been exercised.AI-generated: Claude Code (Claude Sonnet 5.5) wrote these changes in an interactive session with Mark Nottingham, who pointed it at the asctime test and asked for the new check and the timezone fixes.
🤖 Generated with Claude Code