Skip to content

Conversation

derklaro
Copy link
Contributor

Updates the list of restricted headers in jdk11 client implementation.

The current implementation still contains the original disallowed headers from ~6 years ago. Since then there were a few updates making the header restriction less strict. By default only connection content-length expect host upgrade headers are now restricted:
https://github.com/openjdk/jdk/blob/20cb6e786fbf6d924c509e28d6fded86d61a5f84/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java#L178-L179

There is a test in the JDK showing that these headers are now available:
https://github.com/openjdk/jdk/blob/20cb6e786fbf6d924c509e28d6fded86d61a5f84/test/jdk/java/net/httpclient/RequestBuilderTest.java#L345-L358

However, users can allow them anyway setting the jdk.httpclient.allowRestrictedHeaders property in their net.properties, but I did not include that case into this PR.

@velo velo merged commit f1c3ede into OpenFeign:master Apr 2, 2024
velo pushed a commit that referenced this pull request Oct 7, 2024
* update restricted headers in jdk11 client implementation

* update copyright header
velo pushed a commit that referenced this pull request Oct 8, 2024
* update restricted headers in jdk11 client implementation

* update copyright header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants