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 2009/05/21 14:47:45 UTC

[jira] Resolved: (HTTPCORE-197) Chunked content fails to be ever decoded in case of http.socket.buffer-size != 2048 and long chunked content

     [ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-197.
----------------------------------------

    Resolution: Fixed

I applied a slightly different fix and added a test case for the problem. Please review and re-test

Oleg

> Chunked content fails to be ever decoded in case of http.socket.buffer-size != 2048 and long chunked content
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-197
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-197
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0
>            Reporter: Denis Rogov
>            Priority: Critical
>             Fix For: 4.1
>
>         Attachments: truncatedChunkDecoderFix.patch
>
>
> To reproduce just change in org.apache.http.examples.nio.NHttpClient one of the connet entries to
>         reqs[0] = ioReactor.connect(
>                 new InetSocketAddress("www.stuftpizza.com", 80),
>                 null, 
>                 new HttpHost("www.stuftpizza.com"),
>                 new MySessionRequestCallback(requestCount));
> You will receive I/O error: Truncated chunk ( expected size: 457; actual size: 216). Though content the site is returning now is RFC-compliant.
> This site responses now with 6 chunks with lengths(hex) 319, 40f, 1c9, 45, 198, 31. SOCKET_BUFFER_SIZE is configured in this example to 8192. org.apache.http.nio.entity.BufferingNHttpEntity#BUFFER_SIZE is 2048 now and this causes that sometimes destination buffer capacity is less in runtime than the chunk length in ChunkDecoder. Proposed patch is attached for this particular case.

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org