Skip to content

Commit cc69017

Browse files
committed
Bug fix: async cache protocol handler incorrectly updates the actual cache entry in the cache execution context upon cache entry re-validation
1 parent 8156372 commit cc69017

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ void triggerUpdatedCacheEntryResponse(final HttpResponse backendResponse, final
877877
public void completed(final CacheHit updated) {
878878
try {
879879
final SimpleHttpResponse cacheResponse = generateCachedResponse(request, updated.entry, responseDate);
880-
context.setCacheEntry(hit.entry);
880+
context.setCacheEntry(updated.entry);
881881
triggerResponse(cacheResponse, scope, asyncExecCallback);
882882
} catch (final ResourceIOException ex) {
883883
asyncExecCallback.failed(ex);

0 commit comments

Comments
 (0)