httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick \(httpd\)" <>
Subject Re: reading config file one byte at a time
Date Fri, 16 Jun 2000 10:26:05 GMT
> Date: Fri, 16 Jun 2000 02:04:05 -0400
> From: Manoj Kasichainula <>
> On Fri, Jun 16, 2000 at 04:55:22AM -0000, Jeff Trawick (httpd) wrote:
> > I think the file I/O stuff could use a thorough cleanup in both the
> > design and implementation (e.g., doc says you can read 100 bytes *and*
> > get APR_EOF reported; this is not helpful to apps and is contrary to
> > existing APIs; luckily at least some of the code doesn't seem to do
> > this).
> I'm unclear on what you like. It's definitely true that some code does
> not follow that spec. Do you dislike that state of affairs, or do you
> dislike the spec?
> I think returning APR_EOF as well as 100 bytes is perfectly clear. It
> means that you've read 100 bytes and have also hit the end of the
> file. :) Reading 100 bytes and APR_SUCCESS means that you're still in
> the middle of the file, and reading 100 bytes and APR_EIO means that
> there was an I/O error after reading 100 bytes.

I don't have any problem understanding the concept.  I think it is
unexpected to people who have programmed with stdio or OS-level
calls on most operating systems (in other words, everyone that would
use APR).  If I ask for 1024 bytes and only 128 remain, I expect to
get rc=0,nbytes=128 on one call and rc=APR_EOF,nbytes=0 on the next.


View raw message