Message: The following issue has been closed.
--------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/CACTUS-17 Here is an overview of the issue: --------------------------------------------------------------------- Key: CACTUS-17 Summary: Cactus client doesn't handle Chunked-Transfer-Encoding Type: Bug Status: Closed Priority: Major Resolution: WON'T FIX Project: Cactus Components: Framework Fix Fors: 1.3 Assignee: Vincent Massol Reporter: Ryan Shaw Created: Thu, 7 Mar 2002 2:12 AM Updated: Sat, 17 Apr 2004 9:18 AM Environment: Operating System: All Platform: All Description: [Using Cactus 1.2 - It wasn't a choice in the "Version" select list of the bug reporting page.] Currently, the AutoReadHttpURLConnection used by the Cactus client does not properly handle responses from servers which use Chunked-Transfer-Encoding (HTTP 1.1). The result is that Cactus tests hang (block until timeout on socket reads). This is due to logic in the copy() method, which looks for a Content-Length header and, if one is not found, assumes that socket reads will not block. This is a faulty assumption in the case of servers that use Chunked-Transfer-Encoding, which allows for persistent connections despite the fact that the resource size is not known in advance. In this case, the server must not send a Content-Length header (as mandated in the HTTP 1.1 spec). Yet because the connections are persistent, read() blocks. There are two possible ways to fix this problem: 1) Make AutoReadHttpURLConnection properly handle Chunked-Transfer-Encoding. CTE provides a clear mark at the end of the entity, so this is matter of recognizing this mark and closing the connection. 2) Add a "Connection: close" header to the request made by the Cactus client. This will signal to the server that it should close the connection after the response has been sent, in which case read() will NOT block, making the assumption above valid again. 1) is preferable but 2) is probably easier. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
