arturobernalg commented on code in PR #433:
URL:
https://github.com/apache/httpcomponents-client/pull/433#discussion_r1175139334
##########
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:
@ok2c
AFAIU 304 Not Modified responses is already properly implemented in
AsyncCachingExec class. The code in AsyncCachingExec takes care of updating the
cache and sending the appropriate response to the client when a 304 Not
Modified response is received from the backend.
--
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]