Index: AutoReadHttpURLConnection.java
===================================================================
RCS file: /home/cvspublic/jakarta-cactus/framework/src/java/share-12-13-14/org/apache/cactus/internal/client/connector/http/AutoReadHttpURLConnection.java,v
retrieving revision 1.1
diff -u -r1.1 AutoReadHttpURLConnection.java
--- AutoReadHttpURLConnection.java	22 May 2004 11:34:46 -0000	1.1
+++ AutoReadHttpURLConnection.java	17 Jun 2004 10:08:13 -0000
@@ -179,7 +179,7 @@
         LOGGER.debug("Content-Length : [" + this.delegate.getContentLength()
             + "]");
 
-        if (this.delegate.getContentLength() != 0)
+        if (theInputStream!=null && this.delegate.getContentLength() != 0)
         {
             byte[] buf = new byte[DEFAULT_CHUNK_SIZE];
             int count;
