[
https://issues.apache.org/jira/browse/HTTPCORE-655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253597#comment-17253597
]
Oleg Kalnichevski edited comment on HTTPCORE-655 at 12/23/20, 5:14 PM:
-----------------------------------------------------------------------
[~Marcono1234] The commit in question was made in year 2008 and I am not sure
it bears any relevance to the current code base. The actual implementation
obviously makes no attempts to read the remaining content as the connection is
going to be terminated anyway.
Oleg
was (Author: olegk):
[~Marcono1234] The commit in question was made in year 2008 and I am not sure
it bears any relevance to the current code base. The actual implementation
obviously makes no attempts to read the remaining content as the connection is
gong to be terminated anyway.
Oleg
> IdentityInputStream javadoc regarding close() does not match implementation
> ---------------------------------------------------------------------------
>
> Key: HTTPCORE-655
> URL: https://issues.apache.org/jira/browse/HTTPCORE-655
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Affects Versions: 4.4.14, 5.0.3
> Reporter: Marcono1234
> Priority: Minor
>
> The [documentation for
> {{IdentityInputStream}}|https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/impl/io/IdentityInputStream.html]
> says:
> {quote}
> Note that this class NEVER closes the underlying stream, even when close gets
> called. Instead, it will read until the end of the stream (until {{-1}} is
> returned).
> {quote}
> Similarly the
> [tutorials|https://hc.apache.org/httpcomponents-client-4.4.x/tutorial/html/fundamentals.html#d5e145]
> also say:
> {quote}
> [closing the content stream] will attempt to keep the underlying connection
> alive by consuming the entity content
> {quote}
> However, it appears that is not actually true. The
> [implementation|https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IdentityInputStream.java#L78-L80]
> does not try to read the remaining content.
> Note however, that changing this might break existing applications because it
> appears not many users are aware of this behavior (which can be seen by the
> number of reports about {{ChunkedInputStream.close()}} blocking forever).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]