Return-Path: Delivered-To: apmail-jakarta-httpclient-commits-archive@www.apache.org Received: (qmail 71607 invoked from network); 14 Aug 2005 16:53:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Aug 2005 16:53:17 -0000 Received: (qmail 86338 invoked by uid 500); 14 Aug 2005 16:53:17 -0000 Mailing-List: contact httpclient-commits-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: httpclient-dev@jakarta.apache.org Delivered-To: mailing list httpclient-commits@jakarta.apache.org Received: (qmail 86325 invoked by uid 500); 14 Aug 2005 16:53:17 -0000 Delivered-To: apmail-jakarta-httpclient-cvs@jakarta.apache.org Received: (qmail 86322 invoked by uid 99); 14 Aug 2005 16:53:17 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 14 Aug 2005 09:53:17 -0700 Received: (qmail 71604 invoked by uid 65534); 14 Aug 2005 16:53:17 -0000 Message-ID: <20050814165317.71603.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: httpclient-cvs@jakarta.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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; } }