Author: maartenc
Date: Mon Aug  9 21:11:18 2010
New Revision: 983826

URL: http://svn.apache.org/viewvc?rev=983826&view=rev
Log:
FIX: OutOfMemoryError when uploading large files using commons-httpclient 
(IVY-1197)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=983826&r1=983825&r2=983826&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Aug  9 21:11:18 2010
@@ -115,6 +115,7 @@ for detailed view of each issue, please 
 - IMPROVEMENT: ivy:makepom now has an option to disable the generation of an 
extra Ivy comment block in the POM
 - IMPROVEMENT: ivy:makepom now accepts a list of configurations to include 
(IVY-1005) (thanks to Jesper Pedersen)
 
+- FIX: OutOfMemoryError when uploading large files using commons-httpclient 
(IVY-1197)
 - FIX: artifactreport ant task doesn't honor log attribute (IVY-1212)
 - FIX: XmlModuleDescriptorWriter does not write the transitive attribute 
(IVY-1207) (thanks to Abel Muino)
 - FIX: Ivy info/extends/extendsType attribute is misspelled by 
XmlModuleDescriptorWriter (IVY-1203) (thanks to Jason Trump)

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java?rev=983826&r1=983825&r2=983826&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/url/HttpClientHandler.java 
Mon Aug  9 21:11:18 2010
@@ -133,7 +133,7 @@ public class HttpClientHandler extends A
         FileInputStream fileStream = null;
         try {
             fileStream = new FileInputStream(src);
-            put.setRequestEntity(new InputStreamRequestEntity(fileStream));
+            put.setRequestEntity(new InputStreamRequestEntity(fileStream, 
src.length()));
             int statusCode = client.executeMethod(put);
             validatePutStatusCode(dest, statusCode, null);
         } finally {


Reply via email to