--- a/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Thu Jan 24 11:29:16 2019 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Thu Jan 24 12:32:42 2019 +0000
@@ -271,9 +271,9 @@
private CompletableFuture<HttpResponse<T>> handleNoBody(Response r, Exchange<T> exch) {
BodySubscriber<T> bs = responseHandler.apply(new ResponseInfoImpl(r.statusCode(),
r.headers(), r.version()));
- CompletionStage<T> cs = bs.getBody();
bs.onSubscribe(new NullSubscription());
bs.onComplete();
+ CompletionStage<T> cs = ResponseSubscribers.getBodyAsync(executor, bs);
MinimalFuture<HttpResponse<T>> result = new MinimalFuture<>();
cs.whenComplete((nullBody, exception) -> {
if (exception != null)