RFR: 8376031: HttpsURLConnection.getServerCertificates() throws "java.lang.IllegalStateException: connection not yet open" for the HEAD method [v2]
Daniel Fuchs
dfuchs at openjdk.org
Tue Feb 3 16:36:12 UTC 2026
On Sun, 1 Feb 2026 11:28:59 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review feedback
>
> src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java line 1680:
>
>> 1678: respCode == HTTP_NOT_MODIFIED ||
>> 1679: respCode == HTTP_NO_CONTENT) {
>> 1680: noResponseBody();
>
> Would it be better if we moved the next 4 lines in this if block into the implementation of `noResponseBody()`? That way this if block would call that method and it would have all the necessary logic of setting the relevant states?
>
> Of course `AbstractDelegateHttpsURLConnection.java` would in its overridden implementation of `noResponseBody()` would first store the `SSLSession` and then be expected to call the `super.noResponseBody()`, which I think would be a good thing.
done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29489#discussion_r2759938746
More information about the net-dev
mailing list