You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by og...@apache.org on 2005/03/10 11:38:30 UTC

svn commit: r156935 - in jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/HttpConnection.java

Author: oglueck
Date: Thu Mar 10 02:38:29 2005
New Revision: 156935

URL: http://svn.apache.org/viewcvs?view=rev&rev=156935
Log:
Fixed exception in HttpConnection because of unchecked buffer size

PR: 33947
Reviewed by: Oleg Kalnichevsku, Jorge Gonzales Varela

Modified:
    jakarta/commons/proper/httpclient/trunk/release_notes.txt
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diff&r1=156934&r2=156935
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Thu Mar 10 02:38:29 2005
@@ -1,5 +1,6 @@
 Changes since Release Candidate 1:
-
+ * 33947 - Exception in HttpConnection because of unchecked buffer size
+ 
  * 33856 - Fixed the problem with the credential-charset parameter not having an effect on
            the encoding of the NTLM credentials
            Contributed by Oleg Kalnichevski <olegk at apache.org>

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java?view=diff&r1=156934&r2=156935
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java (original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java Thu Mar 10 02:38:29 2005
@@ -732,11 +732,11 @@
                 socket.setReceiveBufferSize(rcvBufSize);
             }        
             int outbuffersize = socket.getSendBufferSize();
-            if (outbuffersize > 2048) {
+            if ((outbuffersize > 2048) || (outbuffersize <= 0)) {
                 outbuffersize = 2048;
             }
             int inbuffersize = socket.getReceiveBufferSize();
-            if (inbuffersize > 2048) {
+            if ((inbuffersize > 2048) || (inbuffersize <= 0)) {
                 inbuffersize = 2048;
             }
             inputStream = new BufferedInputStream(socket.getInputStream(), inbuffersize);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org