RFR: 8263899: HttpClient throws NPE in AuthenticationFilter when parsing www-authenticate head [v2]
Michael McMahon
michaelm at openjdk.java.net
Mon Mar 22 09:55:30 UTC 2021
On Mon, 22 Mar 2021 09:40:43 GMT, Chris Hegarty <chegar at openjdk.org> wrote:
>> Michael McMahon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>>
>> - updated test comment
>> - Merge branch 'master' into 8263899
>> - changed test to use ephemeral port
>> - Initial fix
>
> test/jdk/java/net/httpclient/EmptyAuthenticate.java line 44:
>
>> 42:
>> 43: public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
>> 44: int port = 8000;
>
> I assume that this hardcoded port no. can be removed?
Yes, had just noticed that and pushed a change.
> test/jdk/java/net/httpclient/EmptyAuthenticate.java line 51:
>
>> 49: String response = "test body";
>> 50: exchange.getResponseHeaders().add("www-authenticate", ""); //this empty header will make the HttpClient crash
>> 51: exchange.sendResponseHeaders(401, response.length());
>
> s/crash/throw NPE
Will do
-------------
PR: https://git.openjdk.java.net/jdk/pull/3113
More information about the net-dev
mailing list