Since https://bugs.openjdk.org/browse/JDK-8213696 the JDK HttpClient's list of disallowed headers can be customized by setting jdk.httpclient.allowRestrictedHeaders=host. This is a feature many users desire in a proxy, including Spring Cloud Gateway. Maybe JdkClientHttpRequest can read the same property since it silently skips the header where, I think, HttpClient fails with an exception.

/cc @poutsma