mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 15:07:27 +00:00
HTTPCLIENT-2232: last protocol interceptrs moved at the end of the H2 protocol processing pipeline
This commit is contained in:
parent
ed7701c509
commit
9c0575494a
@ -688,7 +688,10 @@ public CloseableHttpAsyncClient build() {
|
||||
b.addAll(
|
||||
new RequestDefaultHeaders(defaultHeaders),
|
||||
new RequestUserAgent(userAgentCopy),
|
||||
new RequestExpectContinue());
|
||||
new RequestExpectContinue(),
|
||||
new H2RequestContent(),
|
||||
new H2RequestTargetHost(),
|
||||
new H2RequestConnControl());
|
||||
if (!cookieManagementDisabled) {
|
||||
b.add(RequestAddCookies.INSTANCE);
|
||||
}
|
||||
@ -766,7 +769,7 @@ public CloseableHttpAsyncClient build() {
|
||||
|
||||
final AsyncPushConsumerRegistry pushConsumerRegistry = new AsyncPushConsumerRegistry();
|
||||
final IOEventHandlerFactory ioEventHandlerFactory = new H2AsyncClientProtocolStarter(
|
||||
new DefaultHttpProcessor(new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl()),
|
||||
HttpProcessorBuilder.create().build(),
|
||||
(request, context) -> pushConsumerRegistry.get(request),
|
||||
h2Config != null ? h2Config : H2Config.DEFAULT,
|
||||
charCodingConfig != null ? charCodingConfig : CharCodingConfig.DEFAULT);
|
||||
|
@ -820,7 +820,10 @@ public CloseableHttpAsyncClient build() {
|
||||
b.addAll(
|
||||
new RequestDefaultHeaders(defaultHeaders),
|
||||
new RequestUserAgent(userAgentCopy),
|
||||
new RequestExpectContinue());
|
||||
new RequestExpectContinue(),
|
||||
new H2RequestContent(),
|
||||
new H2RequestTargetHost(),
|
||||
new H2RequestConnControl());
|
||||
if (!cookieManagementDisabled) {
|
||||
b.add(RequestAddCookies.INSTANCE);
|
||||
}
|
||||
@ -934,7 +937,7 @@ public CloseableHttpAsyncClient build() {
|
||||
}
|
||||
final AsyncPushConsumerRegistry pushConsumerRegistry = new AsyncPushConsumerRegistry();
|
||||
final IOEventHandlerFactory ioEventHandlerFactory = new HttpAsyncClientProtocolNegotiationStarter(
|
||||
new DefaultHttpProcessor(new H2RequestContent(), new H2RequestTargetHost(), new H2RequestConnControl()),
|
||||
HttpProcessorBuilder.create().build(),
|
||||
(request, context) -> pushConsumerRegistry.get(request),
|
||||
h2Config != null ? h2Config : H2Config.DEFAULT,
|
||||
h1Config != null ? h1Config : Http1Config.DEFAULT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user