Re: HttpMethodBase.releaseConnection() finished download
Adding the ability to abort methods is planned for the 2.1 release, but I don't think anyone has begun work on it yet. If you come up with a good solution that you are willing to submit we would be happy to make use of it. So what would you suggest how an abort should look like? For me, a boolean paramter for the releaseConnection-method would be sufficient. (releaseConnection() would be a shortcut to releaseConnection(boolean) than). I need this now, so i would try to implement a patch. ´ Well, i had a short look at the source. Beside that the call to releaseConnection() is delegeted from one Class to another, i cannot find the place where the InputStream is read until EOF and i cannot imagine how i should avoid it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpMethodBase.releaseConnection() finished download
Sven Köhler wrote: Adding the ability to abort methods is planned for the 2.1 release, but I don't think anyone has begun work on it yet. If you come up with a good solution that you are willing to submit we would be happy to make use of it. So what would you suggest how an abort should look like? For me, a boolean paramter for the releaseConnection-method would be sufficient. (releaseConnection() would be a shortcut to releaseConnection(boolean) than). I need this now, so i would try to implement a patch. For semantic reasons I suggest an HttpMethod::abort() method. You will need to create a patch against CVS HEAD. Because for the 2.0 branch it is definitely too late for this feature. Maybe we will even need a HttpClient::abortAll(), but then HttpClient would need to know all the methods it is currently executing. That is easy to implement however. Odi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpMethodBase.releaseConnection() finished download
Sven, I've not tried this, but if you send a Connection: close header on the request, the server should echo that on the response. If that header is on the response from the server, the the releaseConnection() function will (or at least it should) immediately close the connection, rather than consuming the remainder of the body of the response. Hope that helps. -Eric. Sven Kohler wrote: Hi, it seems that releaseConnection finishes the http-download until it is complete. I don't want that. I'm looking for a way to close the HttpConnection if the download wasn't completed yet. I'm aware that one cannot abort a Http-Transfer without closing the connection and therfor loosing it for keep-alive etc. There doens't seem to be a way of closing the HttpConnection by using the HttpMethodBase-Object. What should i try next? Thx Sven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]