DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13463>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13463 Request/Response race condition when doing multiple requests on the same connection. ------- Additional Comments From [EMAIL PROTECTED] 2003-02-14 02:04 ------- Ok, I think I've figured it out. It seems that calling HttpConnection.releaseConnection() is inherently unsafe. Connections are used on a per method basis but have no reference to the method they are being used by. Here's a scenario: 1) A method (A) gets a connection from the connectionManager 2) A is executed 3) The response from A is read fully and the connection is implicitly released 4) The released connection is given to another method (B) 5) Following the execution of A the user code calls HttpConnection.releaseConnection() 6) The connection is released again 7) B executes but is using a released connection As you can see the connection was released twice for the method A. Currently there is no way for a connection to know that it has already been released from a particular method. This is not a problem if the HttpMethod.releaseConnection() is always used, since it knows to only release its connection once. So, for a quick fix, HttpConnection.releaseConnection() should not be used in client code. I'll try to come up with a solution that fixes it, but we may just have to remove it from public consumption. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
