bneradt commented on PR #12670: URL: https://github.com/apache/trafficserver/pull/12670#issuecomment-3837060903
> Looks good. Once landed, please do a cache-test comparison before / after this PR (compare master to 10.1 I guess?) and see that we only have fixes and no new defects. Good point. I'm working on this before merging instead of after to avoid surprises. This is what I found: ## Test Fixed (Expected Improvements) | Test | Description | Before | After | |------|-------------|--------|-------| | `freshness-max-age-single-quoted` | `max-age='100'` (single-quoted) | FAIL - incorrectly cached | PASS | This was a cache-test failure which was red and is now green. As such, we now align more closely with the RFC and have another passing cache-test result. Now that we are more strict on the RFC compliance, there are other changes though: ## Other Test Changes from Increased Strictness | Test | Description | Before | After | Notes | |------|-------------|--------|-------|-------| | `freshness-max-age-space-after-equals` | `max-age= 100` (space after `=`) | cached | not cached | | `freshness-max-age-space-before-equals` | `max-age =100` (space before `=`) | cached | not cached | | `freshness-max-age-100a` | `max-age=100a` | cached |not cached | Trailing non-digit now causes directive to be ignored | | `freshness-max-age-a100` | `max-age=a100` | cached | not cached | Leading non-digit now causes directive to be ignored | | `freshness-max-age-decimal-five` | `max-age=100.5` | cached | not cached | Decimal values now treated as malformed | | `freshness-max-age-decimal-zero` | `max-age=100.0` |cached | not cached | Decimal values now treated as malformed | | `freshness-max-age-quoted` | `max-age="100"` (double-quoted) |cached | not cached | Double-quoted values now treated as malformed | Observe that each of these are considered "grey" areas in the table: https://cache-tests.fyi/#cc-parse For reference, max-age should be `delta-seconds` which is just digits and explicitly should not be quoted. So these examples all violate the RFC: https://www.rfc-editor.org/rfc/rfc9111.html#name-max-age https://www.rfc-editor.org/rfc/rfc9111.html#section-1.2.2: > delta-seconds = 1*DIGIT ## Conclusion This patch fixes a cache-test, but does make our max-age more strict in other regards too. Therefore, some things that were cached before, such as `max-age=a100`, will no longer be cached. I believe that is fine, and the cache-tests themselves seem to imply this by making the results grey. As a point of comparison, this patch makes our behavior more like Chrome's for each of these cases, aside from the "space-after-equals" test which we reject and they cache. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
