hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r234345 - /jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
Date Sun, 21 Aug 2005 21:26:08 GMT
Author: olegk
Date: Sun Aug 21 14:26:04 2005
New Revision: 234345

URL: http://svn.apache.org/viewcvs?rev=234345&view=rev
Log:
Removed check for presence of chunk-coded content body which was causing more harm than good

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java?rev=234345&r1=234344&r2=234345&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/entity/DefaultEntityGenerator.java
Sun Aug 21 14:26:04 2005
@@ -43,7 +43,6 @@
 import org.apache.http.io.HttpDataInputStream;
 import org.apache.http.io.HttpDataReceiver;
 import org.apache.http.io.InputStreamHttpDataReceiver;
-import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
 
@@ -252,15 +251,7 @@
             } else if ((len > 0) && (CHUNKED_ENCODING.equalsIgnoreCase(encodings[len
- 1].getName()))) { 
                 entity.setChunked(true);
                 entity.setContentLength(-1);
-                // if response body is empty
-                if (datareceiver.isDataAvailable(HttpConnectionParams.getSoTimeout(params)))
{
-                    entity.setContent(new ChunkedInputStream(datareceiver));
-                } else {
-                    if (strict) {
-                        throw new ProtocolException("Chunk-encoded body declared but not
sent");
-                    }
-                    entity.setContent(null);                            
-                }
+                entity.setContent(new ChunkedInputStream(datareceiver));
             } else {
                 if (strict) {
                     throw new ProtocolException("Chunk-encoding must be the last one applied");



Mime
View raw message