Honor jdk.httpclient.allowRestrictedHeaders in Http2Client (#2975) (#… · OpenFeign/feign@39c4f41 · GitHub
Skip to content

Commit 39c4f41

Browse files
authored
Honor jdk.httpclient.allowRestrictedHeaders in Http2Client (#2975) (#3419)
The new Java HttpClient lets callers opt in to setting otherwise restricted headers (such as Host) via the jdk.httpclient.allowRestrictedHeaders system property. Http2Client kept its own static DISALLOWED_HEADERS_SET and stripped those headers before handing the request to the JDK client, so the opt-in had no effect and the header was silently dropped. Mirror jdk.internal.net.http.common.Utils#getDisallowedHeaders() by removing any headers listed in the property from the disallowed set. Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com>
1 parent 62127a8 commit 39c4f41

2 files changed

Lines changed: 59 additions & 3 deletions

File tree

‎java11/src/main/java/feign/http2client/Http2Client.java‎

Lines changed: 16 additions & 3 deletions
Lines changed: 43 additions & 0 deletions

0 commit comments

Comments
 (0)