--- a/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Fri Feb 08 12:44:16 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Fri Feb 08 13:07:44 2019 +0000
@@ -259,7 +259,7 @@
private boolean bodyIsPresent(Response r) {
HttpHeaders headers = r.headers();
- if (headers.firstValue("Content-length").isPresent())
+ if (headers.firstValueAsLong("Content-length").orElse(0L) != 0L)
return true;
if (headers.firstValue("Transfer-encoding").isPresent())
return true;