HTTPCLIENT-2126: `AsyncCachingExec` throws NPE when response body is null
This commit is contained in:
parent
f8fa3f3667
commit
c9489606d5
|
@ -157,7 +157,9 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
|
|||
cacheResponse,
|
||||
content != null ? new BasicEntityDetails(content.length, contentType) : null);
|
||||
if (dataConsumer != null) {
|
||||
dataConsumer.consume(ByteBuffer.wrap(content));
|
||||
if (content != null) {
|
||||
dataConsumer.consume(ByteBuffer.wrap(content));
|
||||
}
|
||||
dataConsumer.streamEnd(null);
|
||||
}
|
||||
asyncExecCallback.completed();
|
||||
|
|
Loading…
Reference in New Issue