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

   **[Dmitry 
Potapov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hirthwork)**
 opened 
**[HTTPCORE-372](https://issues.apache.org/jira/browse/HTTPCORE-372?redirect=false)**
 and commented
   
   I've found that both these classes treats chunked streams without closing 
chunk as complete streams without any errors. This contradicts RFC2616 ยง3.6.1
   
   Consider the following scenario:
   
   1. HttpClient sends request to Server
   2. Server accepts request and send response headers with Transfer-Encoding: 
chunked
   3. Server sends first chunk completely and dies with segfault before sending 
the next chunk
   4. HttpClient receives response headers and creates ChunkedInputStream
   5. ChunkedInputStream reads this first chunk and encounters eof
   
   Expected result:
   IOException thrown indicating incomplete response
   
   Actual result:
   No exception is thrown, -1 is returned on the next read and nobody knows 
that response is incomplete.
   
   
   ---
   
   **Attachments:**
   - 
[expect-closing-chunk.patch](https://issues.apache.org/jira/secure/attachment/12627172/expect-closing-chunk.patch)
 (_5.15 kB_)
   - 
[expect-closing-chunk-v2.patch](https://issues.apache.org/jira/secure/attachment/12627361/expect-closing-chunk-v2.patch)
 (_5.00 kB_)
   


-- 
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