src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
changeset 53701 e57bcfd7bf79
parent 53467 97cf88608d76
parent 53700 4ce47bc1fb92
equal deleted inserted replaced
53699:e402ec38ba9a 53701:e57bcfd7bf79
   257         return r.statusCode == 204;
   257         return r.statusCode == 204;
   258     }
   258     }
   259 
   259 
   260     private boolean bodyIsPresent(Response r) {
   260     private boolean bodyIsPresent(Response r) {
   261         HttpHeaders headers = r.headers();
   261         HttpHeaders headers = r.headers();
   262         if (headers.firstValue("Content-length").isPresent())
   262         if (headers.firstValueAsLong("Content-length").orElse(0L) != 0L)
   263             return true;
   263             return true;
   264         if (headers.firstValue("Transfer-encoding").isPresent())
   264         if (headers.firstValue("Transfer-encoding").isPresent())
   265             return true;
   265             return true;
   266         return false;
   266         return false;
   267     }
   267     }