[
https://issues.apache.org/jira/browse/HTTPASYNC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807118#comment-17807118
]
tassadar commented on HTTPASYNC-171:
------------------------------------
Thanks [~olegk], so there's no way to force? Just add manually add the header i
guess
> Async http post with apache client 5.3
> --------------------------------------
>
> Key: HTTPASYNC-171
> URL: https://issues.apache.org/jira/browse/HTTPASYNC-171
> Project: HttpComponents HttpAsyncClient
> Issue Type: Bug
> Reporter: tassadar
> Priority: Major
>
> I constructed an async client with:
> {code:java}
> private val httpclient = HttpAsyncClients.custom()
> .setConnectionManager(connectionManager)
> .build();{code}
> {color:#172b4d}And i noticed that the Content-Length header is not supplied.
> Invastigating i saw that all the requesta were made as http 2.0, so i tried
> to force an http 1.1 request:
> {color}
> {code:java}
> request.setVersion(HttpVersion.HTTP_1_1)
> localContext.setProtocolVersion(HttpVersion.HTTP_1_1){code}
> but it didn't worked, still the request were made as http 2.0. Trying to
> investigate further i noticed that even if the{color:#172b4d}
> H2RequestContent interceptor is able to manage the http 1.1 request
> (delegating it to super) the
> {color}AbstractH2StreamMultiplexer.{color:#172b4d}getProtocolVersion()
> involved in the process always returns {color}http_2:
> {code:java}
> @Override
> public ProtocolVersion getProtocolVersion() {
> return HttpVersion.HTTP_2;
> }{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]