[
https://issues.apache.org/jira/browse/HTTPCLIENT-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Bryzak updated HTTPCLIENT-829:
-----------------------------------
Attachment: HttpClient_829.java
Attached a simple test case. Simply run the attached file with httpcore-4.0.jar
in your classpath.
The test starts a simple http server which will respond with "012" chunked with
2 seconds between each chunk. It then connects a client with a timeout of 1
second and reads the data from the response 1 character at a time. After the
first character the exception is thrown.
Note that this is just a Java class with a main method, and not a JUnit test
case.
> ChunkedInputStream does not handle sockets with timeouts
> --------------------------------------------------------
>
> Key: HTTPCLIENT-829
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-829
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 3.1 Final
> Reporter: Adam Bryzak
> Attachments: HTTPCLIENT-829.patch, HttpClient_829.java
>
>
> ChunkedInputStream does not handle socket timeouts when reading data. If a
> socket timeout is received after finishing reading a chunk (including it's
> CRLF combination) and before reading the next chunk's length, the next call
> to read will attempt to re-read the CRLF, causing an IOException with the
> message "CRLF expected at end of chunk" to be thrown. I have only tested this
> with 3.0 but it doesn't appear to be fixed in 3.1 or any 4.0 from looking at
> the code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]