You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Denis Rogov (JIRA)" <ji...@apache.org> on 2009/05/20 02:36:45 UTC
[jira] Created: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
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, 4.1
Reporter: Denis Rogov
Priority: Critical
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
[jira] Updated: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Denis Rogov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Rogov updated HTTPCORE-197:
---------------------------------
Attachment: truncatedChunkDecoderFix.patch
Proposed patch for the case.
> 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, 4.1
> Reporter: Denis Rogov
> Priority: Critical
> 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
[jira] Closed: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Denis Rogov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Rogov closed HTTPCORE-197.
--------------------------------
Thanks, Oleg, both branches are validated: 4.0.1 and 4.1. We will look forward on 4.0.1 release as it looks like workaround with reducing SOCKET_BUFFER_SIZE to 2048 impacted code performance.
Denis
> 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
[jira] Commented: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712445#action_12712445 ]
Oleg Kalnichevski commented on HTTPCORE-197:
--------------------------------------------
I am planning to have 4.0.1 released sometime late June. Would that be okay with you? Would you like it released sooner?
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
[jira] Commented: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711602#action_12711602 ]
Oleg Kalnichevski commented on HTTPCORE-197:
--------------------------------------------
We may also have to release 4.0.1 because of this bug, as it is quite severe.
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
[jira] Updated: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski updated HTTPCORE-197:
---------------------------------------
Affects Version/s: (was: 4.1)
Fix Version/s: 4.1
> 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
[jira] Commented: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Denis Rogov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712447#action_12712447 ]
Denis Rogov commented on HTTPCORE-197:
--------------------------------------
Oleg, late June should be fine for us. Thank you!
> 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
[jira] Resolved: (HTTPCORE-197) Chunked content fails to be ever
decoded in case of http.socket.buffer-size != 2048 and long chunked content
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ 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