src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
changeset 53700 4ce47bc1fb92
parent 52196 420445d16008
child 53701 e57bcfd7bf79
--- 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;