jira-importer opened a new issue, #1234:
URL: https://github.com/apache/httpcomponents-core/issues/1234

   **[Arunan 
Sugunakumar](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=arunans23)**
 opened 
**[HTTPCORE-706](https://issues.apache.org/jira/browse/HTTPCORE-706?redirect=false)**
 and commented
   
   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
   
   
   ---
   
   **Affects:** 4.4.15
   
   **Attachments:**
   - 
[asyncbugtest.zip](https://issues.apache.org/jira/secure/attachment/13038863/asyncbugtest.zip)
 (_12.24 kB_)
   - [Screenshot 2022-01-15 at 
23.28.36.png](https://issues.apache.org/jira/secure/attachment/13038862/Screenshot+2022-01-15+at+23.28.36.png)
 (_1.10 MB_)
   - [Screenshot 2022-01-15 at 
23.29.23.png](https://issues.apache.org/jira/secure/attachment/13038861/Screenshot+2022-01-15+at+23.29.23.png)
 (_1.54 MB_)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to