hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r232621 - in /jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl: CoyoteHttpEntity.java HttpConnectionProcessor.java
Date Sun, 14 Aug 2005 16:53:16 GMT
Author: olegk
Date: Sun Aug 14 09:53:11 2005
New Revision: 232621

URL: http://svn.apache.org/viewcvs?rev=232621&view=rev
Log:
Fixed bug in #doWrite()

Modified:
    jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
    jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java

Modified: jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java?rev=232621&r1=232620&r2=232621&view=diff
==============================================================================
--- jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
(original)
+++ jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
Sun Aug 14 09:53:11 2005
@@ -100,15 +100,14 @@
         return false;
     }
 
-    public int writeBytes(final byte[] buffer) throws IOException {
+    public void writeBytes(final byte[] buffer, int off, int len) throws IOException {
         if (buffer == null) {
             throw new IllegalStateException("Buffer may not be null");
         }
         if (this.outstream == null) {
             throw new IllegalStateException("Output stream is null");
         }
-        this.outstream.write(buffer);
-        return buffer.length;
+        this.outstream.write(buffer, off, len);
     }
 
     public void flush() throws IOException {

Modified: jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java?rev=232621&r1=232620&r2=232621&view=diff
==============================================================================
--- jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
(original)
+++ jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
Sun Aug 14 09:53:11 2005
@@ -539,9 +539,10 @@
             this.coyoteres.setCommitted(true);
 		}
 		if (this.out != null) {
-			return this.out.writeBytes(chunk.getBytes()); 
+			this.out.writeBytes(chunk.getBytes(), chunk.getStart(), chunk.getLength()); 
+			return chunk.getLength();
 		} else {
-			return 0;
+			return -1;
 		}
 	}
 



Mime
View raw message