On Mon, 16 Nov 2020 15:54:18 GMT, Patrick Concannon <pconcan...@openjdk.org> 
wrote:

>> Hi,
>> 
>> Could someone please review our code for JDK-8252304: 'Seed an 
>> HttpRequest.Builder from an existing HttpRequest'?
>> 
>> This RFR proposes a new factory method for creating a new `HttpRequest` 
>> builder from an existing `HttpRequest`.
>> This method can be used to build a new request equivalent to the given 
>> request, but with different attributes. For instance, it will allow the user 
>> to take an existing request and add or change a particular header, provide a 
>> new `URI`, etc.
>> 
>> 
>> Kind regards,
>> Patrick & Chris
>
> Patrick Concannon 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 15 additional 
> commits since the last revision:
> 
>  - 8252304: Added more test cases to check header filter
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - 8252304: BiPredicate parameter added to newBuilder
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - Merge remote-tracking branch 'origin/master' into JDK-8252304
>  - 8252304: Removed catch block from newBuilder(HttpRequest)
>  - ... and 5 more: 
> https://git.openjdk.java.net/jdk/compare/bbe1160f...03b13e7a

src/java.net.http/share/classes/java/net/http/HttpRequest.java line 335:

> 333:      *  <li> Remove a particular header (e.g. Foo-Bar):
> 334:      *  <pre>{@code HttpRequest.newBuilder(request, (name, value) -> 
> name.equalsIgnoreCase("Foo-Bar"))}</pre>
> 335:      * </ul>

Does the example above not result in "Foo-Bar" being the only header being 
copied across? So, maybe it should say "Retain a particular header"

-------------

PR: https://git.openjdk.java.net/jdk/pull/1059

Reply via email to