hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r357463 - in /jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl: DefaultHttpClientConnection.java DefaultResponseStrategy.java ResponseStrategy.java
Date Sun, 18 Dec 2005 13:06:43 GMT
Author: olegk
Date: Sun Dec 18 05:06:35 2005
New Revision: 357463

URL: http://svn.apache.org/viewcvs?rev=357463&view=rev
Log:
Deleted ResponseStrategy interface and its default impl

Removed:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultResponseStrategy.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/ResponseStrategy.java
Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=357463&r1=357462&r2=357463&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Sun Dec 18 05:06:35 2005
@@ -81,7 +81,6 @@
     private HttpResponseFactory responsefactory = null;
     private EntityGenerator entitygen = null;
     private EntityWriter entitywriter = null;
-    private ResponseStrategy responsestrategy = null;
     
     public DefaultHttpClientConnection(final HttpHost targethost, final InetAddress localAddress)
{
         super();
@@ -91,7 +90,6 @@
         this.responsefactory = new DefaultHttpResponseFactory();
         this.entitygen = new DefaultEntityGenerator();
         this.entitywriter = new DefaultClientEntityWriter();
-        this.responsestrategy = new DefaultResponseStrategy();
     }
     
     public DefaultHttpClientConnection(final HttpHost targethost) {
@@ -261,7 +259,7 @@
         this.datareceiver.reset(params);
         HttpMutableResponse response = readResponseStatusLine(params);
         readResponseHeaders(response);
-        if (this.responsestrategy.canHaveEntity(null, response)) {
+        if (canResponseHaveBody(response)) {
             readResponseBody(response);
         }
         return response;
@@ -342,7 +340,8 @@
         int status = response.getStatusLine().getStatusCode(); 
         return status >= HttpStatus.SC_OK 
             && status != HttpStatus.SC_NO_CONTENT 
-            && status != HttpStatus.SC_NOT_MODIFIED; 
+            && status != HttpStatus.SC_NOT_MODIFIED
+            && status != HttpStatus.SC_RESET_CONTENT; 
     }
         
     protected void readResponseBody(



Mime
View raw message