Skip to content

Commit 449e7e5

Browse files
committed
Call handleError if failed to call BodyProducer.getContentLength
1 parent d219084 commit 449e7e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/co/cask/http/BasicHttpResponder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public void sendContent(HttpResponseStatus status, final BodyProducer bodyProduc
149149
try {
150150
contentLength = bodyProducer.getContentLength();
151151
} catch (Throwable t) {
152+
bodyProducer.handleError(t);
152153
// Response with error and close the connection
153154
sendContent(HttpResponseStatus.INTERNAL_SERVER_ERROR,
154155
ChannelBuffers.wrappedBuffer(

0 commit comments

Comments
 (0)