hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r234183 - /jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java
Date Sun, 21 Aug 2005 11:43:24 GMT
Author: olegk
Date: Sun Aug 21 04:43:21 2005
New Revision: 234183

URL: http://svn.apache.org/viewcvs?rev=234183&view=rev
Log:
Fixed the bug in #read() method causing incorrect byte to int conversion

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java?rev=234183&r1=234182&r2=234183&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/io/NIOHttpDataReceiver.java
Sun Aug 21 04:43:21 2005
@@ -126,7 +126,11 @@
                 return -1; 
             }
         }
-        return this.buffer.get();
+        int b = this.buffer.get();
+        if (b < 0) {
+            b = 256 + b;
+        }
+        return b;
     }
     
     private int locateLF() {



Mime
View raw message