Skip to content
Permalink
Browse files
HTTPCLIENT-2126: AsyncCachingExec throws NPE when response body is …
…null
  • Loading branch information
ok2c committed Nov 5, 2020
1 parent f8fa3f3 commit c9489606d5ae6ff3af6eac9f407260b3e1f4dca0
Showing 1 changed file with 3 additions and 1 deletion.
@@ -157,7 +157,9 @@ private void triggerResponse(
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();

0 comments on commit c948960

Please sign in to comment.