Revision: 4907 http://sourceforge.net/p/vexi/code/4907 Author: mkpg2 Date: 2016-11-24 08:47:52 +0000 (Thu, 24 Nov 2016) Log Message: ----------- Fix. Content length can be -1 apparently.
Modified Paths: -------------- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Fountain.java Modified: branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Fountain.java =================================================================== --- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Fountain.java 2016-11-24 01:11:27 UTC (rev 4906) +++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Fountain.java 2016-11-24 08:47:52 UTC (rev 4907) @@ -430,13 +430,13 @@ // REMARK need our own buffer, since pipe can be recurvively called with HTTP stuff (reading response) // and want to be able to do file uploads in parallel. - int bufferSize = 1024; - if(contentLength!=null){ + int bufferSize = 8192; + if(contentLength!=null && contentLength>0){ if(contentLength<bufferSize){ bufferSize = (int)(1*contentLength); }else{ // just increase buffer a bit for bigger requests - for(int i=0; i<6 && contentLength>8*bufferSize; i++){ + for(int i=0; i<3 && contentLength>8*bufferSize; i++){ bufferSize *=2; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn