arturobernalg opened a new pull request, #421:
URL: https://github.com/apache/httpcomponents-client/pull/421

   Fix handling of cache entries with variants that have different ETag values
   
   Previously, the `getCacheEntry` method was not correctly handling cache 
entries with variants that had different ETag values. This was leading to 
incorrect behavior when serving cached responses, which resulted in failing 
tests.
   
   This commit fixes the issue by correctly identifying the cache entry using 
the request's cache key, and then selecting the variant with the matching ETag 
value. If there is no matching variant, the cache entry is considered stale and 
a new response is fetched from the origin server.
   
   This change is aligned with RFC7232 section 2.3 which states that when an 
origin server sends multiple representations of a resource with different ETag 
values, a cache should cache all of them. This means that the cache should be 
able to correctly identify and serve any of the cached variants based on their 
ETag values.


-- 
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: dev-unsubscr...@hc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to