src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
changeset 53701 e57bcfd7bf79
parent 53467 97cf88608d76
parent 53700 4ce47bc1fb92
--- 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;