mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-07 18:49:38 +00:00
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 CloseableHttpAsyncClient build() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.addAll(
|
b.addAll(
|
||||||
|
new H2RequestTargetHost(),
|
||||||
new RequestDefaultHeaders(defaultHeaders),
|
new RequestDefaultHeaders(defaultHeaders),
|
||||||
new RequestUserAgent(userAgentCopy),
|
new RequestUserAgent(userAgentCopy),
|
||||||
new RequestExpectContinue(),
|
new RequestExpectContinue(),
|
||||||
new H2RequestContent(),
|
new H2RequestContent(),
|
||||||
new H2RequestTargetHost(),
|
|
||||||
new H2RequestConnControl());
|
new H2RequestConnControl());
|
||||||
if (!cookieManagementDisabled) {
|
if (!cookieManagementDisabled) {
|
||||||
b.add(RequestAddCookies.INSTANCE);
|
b.add(RequestAddCookies.INSTANCE);
|
||||||
|
@ -832,11 +832,11 @@ public CloseableHttpAsyncClient build() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.addAll(
|
b.addAll(
|
||||||
|
new H2RequestTargetHost(),
|
||||||
new RequestDefaultHeaders(defaultHeaders),
|
new RequestDefaultHeaders(defaultHeaders),
|
||||||
new RequestUserAgent(userAgentCopy),
|
new RequestUserAgent(userAgentCopy),
|
||||||
new RequestExpectContinue(),
|
new RequestExpectContinue(),
|
||||||
new H2RequestContent(),
|
new H2RequestContent(),
|
||||||
new H2RequestTargetHost(),
|
|
||||||
new H2RequestConnControl());
|
new H2RequestConnControl());
|
||||||
if (!cookieManagementDisabled) {
|
if (!cookieManagementDisabled) {
|
||||||
b.add(RequestAddCookies.INSTANCE);
|
b.add(RequestAddCookies.INSTANCE);
|
||||||
|
@ -113,8 +113,8 @@ public static CloseableHttpAsyncClient createHttp2System() {
|
|||||||
|
|
||||||
private static HttpProcessor createMinimalProtocolProcessor() {
|
private static HttpProcessor createMinimalProtocolProcessor() {
|
||||||
return new DefaultHttpProcessor(
|
return new DefaultHttpProcessor(
|
||||||
new H2RequestContent(),
|
|
||||||
new H2RequestTargetHost(),
|
new H2RequestTargetHost(),
|
||||||
|
new H2RequestContent(),
|
||||||
new H2RequestConnControl(),
|
new H2RequestConnControl(),
|
||||||
new RequestUserAgent(VersionInfo.getSoftwareInfo(
|
new RequestUserAgent(VersionInfo.getSoftwareInfo(
|
||||||
"Apache-HttpAsyncClient", "org.apache.hc.client5", HttpAsyncClients.class)));
|
"Apache-HttpAsyncClient", "org.apache.hc.client5", HttpAsyncClients.class)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user