arturobernalg commented on code in PR #433:
URL: 
https://github.com/apache/httpcomponents-client/pull/433#discussion_r1175170896


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java:
##########
@@ -395,6 +427,22 @@ ClassicHttpResponse cacheAndReturnResponse(
             final Instant requestSent,
             final Instant responseReceived) throws IOException {
         LOG.debug("Caching backend response");
+
+        // handle 304 Not Modified responses
+        if (backendResponse.getCode() == HttpStatus.SC_NOT_MODIFIED) {

Review Comment:
   regarding with the unrelated change I think the only one its the remove 
method.
   
   basically the change are:
   
   1. In the CachingExec class,  handle 304 Not Modified responses in the 
cacheAndReturnResponse method. 
   2. In the CachedResponseSuitabilityChecker class, I added a new method 
isGetRequestWithHeadCacheEntry and a check in the canCachedResponseBeUsed 
method.



-- 
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