RFR: 8209178: Proxied HttpsURLConnection doesn't send BODY when retrying POST request
Julia Boes
julia.boes at oracle.com
Tue Sep 24 15:11:20 UTC 2019
Hi,
This fix addresses an issue in HttpClient when retrying a POST request
over proxied HTTPS. In this case, the request body is stored in a
PosterOutputStream poster, which is set to null in
sun/net/www/protocol/http/HttpURLConnection::sendCONNECTRequest after
the first request.
The fix addresses this issue by storing the current state of poster in a
local variable in a new method HttpClient::checkTunneling.
Note: The system property 'sun.net.http.retryPost' defaults to true in
HttpClient line 180 but the test is run explicitly for both options for
readability.
Bug: https://bugs.openjdk.java.net/browse/JDK-8209178
Webrev:
http://cr.openjdk.java.net/~jboes/webrevs/8209178/webrev.00/index.html
The test case was provided by the submitter of the original bug, Arrault
Fabien.
Regards,
Julia
More information about the net-dev
mailing list