[
https://issues.apache.org/jira/browse/HTTPCORE-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676001#comment-17676001
]
Johan Compagner commented on HTTPCORE-732:
------------------------------------------
not really, because sending multipart and then getting the correct content
length that needs to be set is fully in the core
So what do you propose that i need to set?
so why doesn't HC client do that for me? around this line:
[httpcomponents-core/H2RequestContent.java at master ·
apache/httpcomponents-core
(github.com)|https://github.com/apache/httpcomponents-core/blob/master/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/protocol/H2RequestContent.java#L82]
so the content length if it knows it anyway?
> Is it onpurpose that content-length header is not set in http/2 mode?
> ---------------------------------------------------------------------
>
> Key: HTTPCORE-732
> URL: https://issues.apache.org/jira/browse/HTTPCORE-732
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore
> Affects Versions: 5.1.4
> Reporter: Johan Compagner
> Priority: Major
>
> see: [httpcomponents-core/H2RequestContent.java at master ·
> apache/httpcomponents-core
> (github.com)|https://github.com/apache/httpcomponents-core/blob/master/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/protocol/H2RequestContent.java#L82]
>
> there 3 things are set, but not the content length.
> (if protocol would be < 2 then super.process() would be called which would
> set it)
>
> i know http/2 mode setting the content length is optional. But some servers
> seems to really want it. And i think as long as the content-length is known
> upfront it shouldn't harm to set it right?
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]