dxbjavid commented on code in PR #874:
URL:
https://github.com/apache/httpcomponents-client/pull/874#discussion_r3797276925
##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheControlHeaderParser.java:
##########
@@ -238,12 +245,31 @@ public final RequestCacheControl parse(final HttpRequest
request) {
private static long parseSeconds(final String name, final String value) {
final long delta = CacheSupport.deltaSeconds(value);
- if (delta == -1 && LOG.isDebugEnabled()) {
Review Comment:
agreed, that's the cleaner root cause. i've pulled it into deltaSeconds so
an unparseable value now returns -1 instead of 0, which means a malformed
s-maxage reads as absent everywhere it's used and the original shared-cache
auth check catches it with no extra plumbing. that let me drop the sentinel and
revert the parser and policy changes entirely, so the fix is now just the one
line in deltaSeconds plus the two tests that were asserting the old 0. full
cache suite is green.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]