mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274779: HttpURLConnection: HttpClient and HttpsClient incorrectly check request method when set to POST
Reviewed-by: dfuchs, coffeys, vtewari, michaelm
This commit is contained in:
parent
60cb27dcda
commit
45ce06c9f3
4 changed files with 177 additions and 2 deletions
|
@ -307,7 +307,7 @@ public class HttpClient extends NetworkClient {
|
|||
ret = kac.get(url, null);
|
||||
if (ret != null && httpuc != null &&
|
||||
httpuc.streaming() &&
|
||||
httpuc.getRequestMethod() == "POST") {
|
||||
"POST".equals(httpuc.getRequestMethod())) {
|
||||
if (!ret.available()) {
|
||||
ret.inCache = false;
|
||||
ret.closeServer();
|
||||
|
|
|
@ -329,7 +329,7 @@ final class HttpsClient extends HttpClient
|
|||
ret = (HttpsClient) kac.get(url, sf);
|
||||
if (ret != null && httpuc != null &&
|
||||
httpuc.streaming() &&
|
||||
httpuc.getRequestMethod() == "POST") {
|
||||
"POST".equals(httpuc.getRequestMethod())) {
|
||||
if (!ret.available())
|
||||
ret = null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue