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 commit is contained in:
parent
152ba4736f
commit
4b7986370f
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue