RFR: 8291637: HttpClient default keep alive timeout not followed if server sends invalid value [v2]
Daniel Fuchs
dfuchs at openjdk.org
Fri Aug 5 12:58:02 UTC 2022
On Fri, 5 Aug 2022 10:32:56 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Hi,
>>
>> Some new keep alive tests are exposing some old bugs. In this case if the server sends an invalid timeout (say -20 seconds) we accept it creating a timeout in the past. So, the first time the keep alive thread wakes up it will close the connection.
>> The correct behavior is to ignore the invalid parameter and fallback to the default timeout or the timeout set by the relevant system property.
>>
>> Thanks,
>> Michael
>
> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
>
> update from Jai's review
Otherwise LGTM too
test/jdk/sun/net/www/http/KeepAliveCache/B8291637.java line 61:
> 59: try {
> 60: serverSocket.close();
> 61: s.close();
Could that trigger a NPE if `s` is null?
-------------
Marked as reviewed by dfuchs (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9755
More information about the net-dev
mailing list