mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8204679: HTTP Client refresh
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com> Co-authored-by: Michael McMahon <michael.x.mcmahon@oracle.com> Co-authored-by: Pavel Rappo <pavel.rappo@oracle.com> Reviewed-by: chegar, dfuchs, michaelm
This commit is contained in:
parent
8c5dfa21b3
commit
659fdd8dc4
161 changed files with 8019 additions and 1853 deletions
|
@ -227,8 +227,8 @@ class ExchangeImpl {
|
|||
contentLen = -1;
|
||||
}
|
||||
|
||||
if (isHeadRequest()) {
|
||||
/* HEAD requests should not set a content length by passing it
|
||||
if (isHeadRequest() || rCode == 304) {
|
||||
/* HEAD requests or 304 responses should not set a content length by passing it
|
||||
* through this API, but should instead manually set the required
|
||||
* headers.*/
|
||||
if (contentLen >= 0) {
|
||||
|
@ -239,7 +239,7 @@ class ExchangeImpl {
|
|||
}
|
||||
noContentToSend = true;
|
||||
contentLen = 0;
|
||||
} else { /* not a HEAD request */
|
||||
} else { /* not a HEAD request or 304 response */
|
||||
if (contentLen == 0) {
|
||||
if (http10) {
|
||||
o.setWrappedStream (new UndefLengthOutputStream (this, ros));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue