Merge branch '6.2.x'
This commit is contained in:
commit
6653cd86ea
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -19,6 +19,7 @@ package org.springframework.http.client;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
|
|
@ -102,6 +103,7 @@ final class SimpleClientHttpResponse implements ClientHttpResponse {
|
|||
if (this.responseStream == null) {
|
||||
getBody();
|
||||
}
|
||||
Objects.requireNonNull(this.responseStream);
|
||||
StreamUtils.drain(this.responseStream);
|
||||
this.responseStream.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue