You are viewing a plain text version of this content. The canonical link for it is here.
Posted to droids-dev@incubator.apache.org by "Thorsten Scherler (JIRA)" <ji...@apache.org> on 2009/09/10 12:16:58 UTC
[jira] Closed: (DROIDS-63) Release HttpClient resources
[ https://issues.apache.org/jira/browse/DROIDS-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Scherler closed DROIDS-63.
-----------------------------------
Resolution: Fixed
Thanks very much Javier.
I change 400 to HttpStatus.SC_BAD_REQUEST.
Committed revision 813400.
> Release HttpClient resources
> ----------------------------
>
> Key: DROIDS-63
> URL: https://issues.apache.org/jira/browse/DROIDS-63
> Project: Droids
> Issue Type: Bug
> Components: core
> Affects Versions: 0.01
> Environment: Java VM 1.6.0_12
> Reporter: Javier Puerto
> Attachments: ReleaseConnections.diff
>
> Original Estimate: 0.08h
> Remaining Estimate: 0.08h
>
> I made a little crawler to process some intranet documents .Working with the latest version of Droids I was testing the behaviour with errors. And the problem is that the HttpClient pool don't release the conections after a status code 500 from the server.
> Reading the documentation for HttpClient (1.1.5), found that is needed to release the resources.
> Index: src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
> ===================================================================
> --- src/main/java/org/apache/droids/protocol/http/HttpProtocol.java (revision 810841)
> +++ src/main/java/org/apache/droids/protocol/http/HttpProtocol.java (working copy)
> @@ -63,6 +63,7 @@
> HttpResponse response = httpclient.execute(httpget);
> StatusLine statusline = response.getStatusLine();
> if (statusline.getStatusCode() != HttpStatus.SC_OK) {
> + httpget.abort();
> throw new HttpResponseException(
> statusline.getStatusCode(), statusline.getReasonPhrase());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.