Dmitry Potapov created HTTPCORE-372:
---------------------------------------
Summary: ChunkedInputStream and ChunkDecoder allows closing chunk
absence
Key: HTTPCORE-372
URL: https://issues.apache.org/jira/browse/HTTPCORE-372
Project: HttpComponents HttpCore
Issue Type: Bug
Components: HttpCore, HttpCore NIO
Affects Versions: 4.4-alpha1
Reporter: Dmitry Potapov
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.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]