--- a/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Fri Feb 08 11:26:21 2019 +0000
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java Fri Feb 08 12:23:16 2019 +0000
@@ -217,7 +217,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;