Skip to content

Commit 7cbe714

Browse files
committed
fixed for Http1xTest#testUseRequestAfterComplete unit test.
1 parent 4ddbecb commit 7cbe714

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vertx-core/src/main/java/io/vertx/core/http/impl/HttpClientRequestImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,9 @@ private Future<Void> write(ByteBuf buff, boolean end) {
504504
}
505505
}
506506
} else if (requiresContentLength(false)) {
507-
throw new IllegalStateException("You must set the Content-Length header to be the total size of the message "
507+
IllegalStateException e = new IllegalStateException("You must set the Content-Length header to be the total size of the message "
508508
+ "body BEFORE sending any data if you are not using HTTP chunked encoding.");
509+
return Future.failedFuture(e);
509510
}
510511
return doWrite(buff, end, false);
511512
}

0 commit comments

Comments
 (0)