mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 20:14:43 +02:00
8218662: Allow 204 responses with Content-Length:0
Reviewed-by: michaelm
This commit is contained in:
parent
10a281c485
commit
fb05ae21bb
2 changed files with 36 additions and 2 deletions
|
@ -217,7 +217,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue