Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 85901 invoked from network); 6 Aug 2004 17:27:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Aug 2004 17:27:29 -0000 Received: (qmail 43262 invoked by uid 500); 6 Aug 2004 17:27:29 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 43242 invoked by uid 500); 6 Aug 2004 17:27:28 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 43223 invoked by uid 99); 6 Aug 2004 17:27:28 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received: from [206.190.38.70] (HELO web50405.mail.yahoo.com) (206.190.38.70) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 06 Aug 2004 10:27:25 -0700 Message-ID: <20040806172724.63259.qmail@web50405.mail.yahoo.com> Received: from [64.242.52.23] by web50405.mail.yahoo.com via HTTP; Fri, 06 Aug 2004 10:27:24 PDT Date: Fri, 6 Aug 2004 10:27:24 -0700 (PDT) From: Lee Carmichael Subject: Re: A possible bug with get_line in v1.3 To: apreq-dev@httpd.apache.org In-Reply-To: <87d624wamm.fsf@gemini.sunstarsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > > Also, would it be best for me to post the updated > > 'get_line' function to the list for review or is > there > > a better way? > > Sure, let's see it. However apreq-1 really needs a > new release > manager to volunteer, because my personal focus now > is on apreq-2. Well I've tried one thing which is: char* get_line([...]) { [...] if (!ptr) { int tries = 0; int maxtries = 15; /* some number... */ while (self->bytes_in_buffer < self->bufsize && self->r->remaining > 0 && tries <= maxtries ) { fill_buffer(self); ptr = next_line(self); if (ptr) break; tries++; } } My other thought was that if the fill_buffer function could be smarter about its reading. It could try some number of times to read when its buffer was not full and there were still data available. Much like the update to get_line above. Neither is a great choice since both require a manual try count just in case the content length was off. Thoughts? Thanks, Lee __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail