You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2021/12/30 13:48:00 UTC
[jira] [Resolved] (HTTPCORE-706) Receiving incomplete payload from the backend after httpcore-nio version upgrade
[ https://issues.apache.org/jira/browse/HTTPCORE-706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-706.
----------------------------------------
Resolution: Cannot Reproduce
> Receiving incomplete payload from the backend after httpcore-nio version upgrade
> --------------------------------------------------------------------------------
>
> Key: HTTPCORE-706
> URL: https://issues.apache.org/jira/browse/HTTPCORE-706
> Project: HttpComponents HttpCore
> Issue Type: Bug
> Components: HttpCore NIO
> Affects Versions: 4.4.15
> Reporter: Arunan Sugunakumar
> Priority: Major
>
> Hi,
> We recently migrated to httpcore-nio 4.4.14 and we have been encountering some issues when connecting to a HTTPS Backend that sends chunked responses. The backend behaves in such a manner that when it sends the response, it immediately closes the connection after completion.
> When we debugged the code we found out that the ChunkDecoder never completes, hence we are receiving the payload in half. In SSLEnginImpl, when the close_notify event _"RECV TLSv1.2 ALERT: warning, close_notify"_ is received, it makes the _sslEngine.isInboundDone()_ as true. There are couples of fixes[1][2] done in SSLIOSession class which makes the SSLIOSession into _CLOSING_ state[3] and makes _endOfStream_ as true[4]. As a result, ChunkDecoder never gets completed and the connection gets closed before receiving the complete payload. This worked completely fine when we were using httpcore-nio 4.3.3.
> I will try to provide a simplified version of the code that reproduces the issue. In the meantime, is it possible to provide your feedback on whether such behavior is expected?
> [1] - https://github.com/apache/httpcomponents-core/commit/08d9c3c30d57def4963d0807bce5f3023f5fcb35
> [2] - [https://github.com/apache/httpcomponents-core/commit/01f3d30cfa3b1bf643a8ea5733fdd3bde8c56abd]
> [3] - [https://github.com/apache/httpcomponents-core/blob/4.4.14-RC2/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java#L380]
> [4] - [https://github.com/apache/httpcomponents-core/blob/4.4.14-RC2/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java#L527]
>
> Thanks & Regards,
> Arunan
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org