Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 45153 invoked by uid 500); 13 Mar 2002 15:01:26 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 45140 invoked from network); 13 Mar 2002 15:01:26 -0000 Reply-To: From: "Ryan Bloom" To: "'Jeff Trawick'" , "'Aaron M. Folmsbee'" Cc: Subject: RE: apr_file_gets return code Date: Wed, 13 Mar 2002 07:01:23 -0800 Organization: Covalent Technologies Message-ID: <004301c1ca9f$f16148a0$0a01230a@KOJ> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Just a word to the wise, there are apps out there that rely on this behavior. Apache is one of them, so if you modify this, please double check Apache at the same time. Ryan ---------------------------------------------- Ryan Bloom rbb@covalent.net 645 Howard St. rbb@apache.org San Francisco, CA > -----Original Message----- > From: trawick@rdu88-250-166.nc.rr.com [mailto:trawick@rdu88-250- > 166.nc.rr.com] On Behalf Of Jeff Trawick > Sent: Wednesday, March 13, 2002 6:55 AM > To: Aaron M. Folmsbee > Cc: dev@apr.apache.org > Subject: Re: apr_file_gets return code > > "Aaron M. Folmsbee" writes: > > > apr_file_gets returns APR_EOF if it encounters an eof condition ( or any > > error condition...) while there is still room left in the read buffer. > > This means that APR_EOF is returned if you read the last line in a file > > with a buffer larger then the last line. I would submit that the correct > > behaviour is to return success if anything is read before encountering > > the eof. > > I think I agree with your comment about the proper behavior: It should > return APR_SUCCESS if it read any bytes into the caller's buffer. > > What OS did you encounter the problem on? > > Was there a '\n' at the end of the file? > > Do you have a patch? > > -- > Jeff Trawick | trawick@attglobal.net > Born in Roswell... married an alien...