This commit is contained in:
Chris Hegarty 2019-02-08 13:07:44 +00:00
commit ac5daa7a22
2 changed files with 36 additions and 3 deletions

View file

@ -259,7 +259,7 @@ class MultiExchange<T> {
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;