mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 23:16:33 +00:00
HTTPCLIENT-2126: AsyncCachingExec
throws NPE when response body is null
This commit is contained in:
parent
f8fa3f3667
commit
c9489606d5
@ -157,7 +157,9 @@ private void triggerResponse(
|
||||
cacheResponse,
|
||||
content != null ? new BasicEntityDetails(content.length, contentType) : null);
|
||||
if (dataConsumer != null) {
|
||||
if (content != null) {
|
||||
dataConsumer.consume(ByteBuffer.wrap(content));
|
||||
}
|
||||
dataConsumer.streamEnd(null);
|
||||
}
|
||||
asyncExecCallback.completed();
|
||||
|
Loading…
x
Reference in New Issue
Block a user