Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 57093 invoked from network); 9 Sep 2007 09:52:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Sep 2007 09:52:14 -0000 Received: (qmail 27392 invoked by uid 500); 9 Sep 2007 09:51:58 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 27342 invoked by uid 500); 9 Sep 2007 09:51:58 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 27331 invoked by uid 99); 9 Sep 2007 09:51:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 02:51:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 09 Sep 2007 09:53:31 +0000 Received: (qmail 56770 invoked by uid 2161); 9 Sep 2007 09:51:41 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 5B3E91721C for ; Sun, 9 Sep 2007 11:51:31 +0200 (CEST) Message-ID: <46E3C229.9010303@apache.org> Date: Sun, 09 Sep 2007 11:51:37 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r573903 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c References: <20070908202915.142AB1A9838@eris.apache.org> In-Reply-To: <20070908202915.142AB1A9838@eris.apache.org> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/08/2007 10:29 PM, niq@apache.org wrote: > Author: niq > Date: Sat Sep 8 13:29:14 2007 > New Revision: 573903 > > URL: http://svn.apache.org/viewvc?rev=573903&view=rev > Log: > mod_proxy: Don't lose bytes when a response line arrives in small chunks. > PR 40894 > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/modules/proxy/proxy_util.c > > > Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=573903&r1=573902&r2=573903&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original) > +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sat Sep 8 13:29:14 2007 > @@ -994,12 +994,14 @@ > len = (bufflen-1)-(pos-buff); > } > if (len > 0) { > - pos = apr_cpystrn(pos, response, len); > + memcpy(pos, response, len); > + pos += len; I am slightly confused here: IMHO apr_cpystrn does exactly what you do here (it terminates pos with \0 and sets the pointer of pos to the terminating \0) But it avoids reading over a possible terminating \0 in response which seems good to me. Regards RĂ¼diger