mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8211437: java.net.http.HttpClient hangs on 204 reply without Content-length 0
Reviewed-by: chegar, dfuchs
This commit is contained in:
parent
4abb6861ec
commit
b9279ef850
5 changed files with 396 additions and 4 deletions
|
@ -255,9 +255,7 @@ class ExchangeImpl {
|
|||
noContentToSend = true;
|
||||
contentLen = 0;
|
||||
}
|
||||
if (noContentLengthHeader) {
|
||||
rspHdrs.remove("Content-length");
|
||||
} else {
|
||||
if (!noContentLengthHeader) {
|
||||
rspHdrs.set("Content-length", Long.toString(contentLen));
|
||||
}
|
||||
o.setWrappedStream (new FixedLengthOutputStream (this, ros, contentLen));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue