incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r813400 - /incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
Date Thu, 10 Sep 2009 12:15:35 GMT
Author: thorsten
Date: Thu Sep 10 12:15:35 2009
New Revision: 813400

URL: http://svn.apache.org/viewvc?rev=813400&view=rev
Log:
DROIDS-63
Release HttpClient resources 
Reporter/due-to:  	 Javier Puerto
Muchas gracias Javier

Modified:
    incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java

Modified: incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
URL: http://svn.apache.org/viewvc/incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java?rev=813400&r1=813399&r2=813400&view=diff
==============================================================================
--- incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
(original)
+++ incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
Thu Sep 10 12:15:35 2009
@@ -62,7 +62,8 @@
     HttpGet httpget = new HttpGet(uri);
     HttpResponse response = httpclient.execute(httpget);
     StatusLine statusline = response.getStatusLine();
-    if (statusline.getStatusCode() != HttpStatus.SC_OK) {
+    if (statusline.getStatusCode() >= HttpStatus.SC_BAD_REQUEST) {
+      httpget.abort();
       throw new HttpResponseException(
           statusline.getStatusCode(), statusline.getReasonPhrase());
     }



Mime
View raw message