Skip to content

Commit

Permalink
HTTPCLIENT-2293: client protocol handlers to try to send Host as th…
Browse files Browse the repository at this point in the history
…e first header in the request header section per RFC 9110 section 7.2
  • Loading branch information
ok2c committed Oct 12, 2023
1 parent 7ef0c10 commit 07f0d4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,11 @@ public CloseableHttpAsyncClient build() {
}
}
b.addAll(
new H2RequestTargetHost(),
new RequestDefaultHeaders(defaultHeaders),
new RequestUserAgent(userAgentCopy),
new RequestExpectContinue(),
new H2RequestContent(),
new H2RequestTargetHost(),
new H2RequestConnControl());
if (!cookieManagementDisabled) {
b.add(RequestAddCookies.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,11 +832,11 @@ public CloseableHttpAsyncClient build() {
}
}
b.addAll(
new H2RequestTargetHost(),
new RequestDefaultHeaders(defaultHeaders),
new RequestUserAgent(userAgentCopy),
new RequestExpectContinue(),
new H2RequestContent(),
new H2RequestTargetHost(),
new H2RequestConnControl());
if (!cookieManagementDisabled) {
b.add(RequestAddCookies.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public static CloseableHttpAsyncClient createHttp2System() {

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)));
Expand Down

0 comments on commit 07f0d4d

Please sign in to comment.