The reason I'm asking is because when we upgraded org.apache.httpcomponents.client5 from version 5.2 to 5.4.1, we ran into issues where the client request was rejected by the server due to an invalid header combination: Upgrade: TLS/1.2Connection: keep-alive This header combination is invalid because if the "Upgrade" header is present, the "Connection" header must equal to, or contain the string "Upgrade". Since we are going through RequestConfig$Builder, "protocolUpgradeEnabled" was automatically enabled, and we had to set it to "false" in order to disable it.
On Friday, January 3, 2025 at 10:12:37 AM PST, jan luehe <janlu...@yahoo.com> wrote: Support for org.apache.hc.client5.http.config.RequestConfig's "protocolUpgradeEnabled" was introduced via this commit: https://github.com/apache/httpcomponents-client/commit/3235f009d5673536be5c668df409ac3f83808d89 The default RequestConfig constructor sets it to "false", whereas the RequestConfig$Builder sets it to "true" by default. Same is true for RequestConfig's "contentCompressionEnabled" and "hardCancellationEnabled" fields. I believe RequestConfig$Builder should initialize these fields to "false" also.