You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2023/10/12 10:07:05 UTC
[httpcomponents-client] 01/02: HTTPCLIENT-2293: client protocol handlers to try to send `Host` as the first header in the request header section per RFC 9110 section 7.2
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 5.4.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
commit 07f0d4d64ebbae859ec43e2e3bccdb1554d4e4f1
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Mon Oct 9 11:08:27 2023 +0200
HTTPCLIENT-2293: client protocol handlers to try to send `Host` as the first header in the request header section per RFC 9110 section 7.2
---
.../org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java | 2 +-
.../org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java | 2 +-
.../java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
index 68bdd465f..5b0e7e956 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
@@ -684,11 +684,11 @@ public class H2AsyncClientBuilder {
}
}
b.addAll(
+ new H2RequestTargetHost(),
new RequestDefaultHeaders(defaultHeaders),
new RequestUserAgent(userAgentCopy),
new RequestExpectContinue(),
new H2RequestContent(),
- new H2RequestTargetHost(),
new H2RequestConnControl());
if (!cookieManagementDisabled) {
b.add(RequestAddCookies.INSTANCE);
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
index 346d315c8..673dbbf09 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
@@ -832,11 +832,11 @@ public class HttpAsyncClientBuilder {
}
}
b.addAll(
+ new H2RequestTargetHost(),
new RequestDefaultHeaders(defaultHeaders),
new RequestUserAgent(userAgentCopy),
new RequestExpectContinue(),
new H2RequestContent(),
- new H2RequestTargetHost(),
new H2RequestConnControl());
if (!cookieManagementDisabled) {
b.add(RequestAddCookies.INSTANCE);
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
index cb0d1e2cf..cfe292dd1 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClients.java
@@ -113,8 +113,8 @@ public final class HttpAsyncClients {
private static HttpProcessor createMinimalProtocolProcessor() {
return new DefaultHttpProcessor(
- new H2RequestContent(),
new H2RequestTargetHost(),
+ new H2RequestContent(),
new H2RequestConnControl(),
new RequestUserAgent(VersionInfo.getSoftwareInfo(
"Apache-HttpAsyncClient", "org.apache.hc.client5", HttpAsyncClients.class)));