httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Apache/2.0.22-dev is running on apache.org
Date Wed, 25 Jul 2001 21:42:27 GMT
On Wed, Jul 25, 2001 at 04:12:13PM -0400, Jeff Trawick wrote:
> Jeff Trawick <trawick@attglobal.net> writes:
> 
> > Greg Ames <gregames@remulak.net> writes:
> > 
> > > But what if we have rv == -1, EAGAIN, and nbytes == 0 ?  I don't think
> > > we handle that properly yet in FreeBSD, nor in Solaris.  Looks to me
> > > like the new FreeBSD code will exit apr_sendfile with APR_EAGAIN, and
> > > sendfile_it_all will bail, and the request will die.  
> > 
> > yeah, it definitely looks busted...  I'll work on that...
> 
> Here is a patch for FreeBSD which I'll commit soon if nobody
> complains.  It fixes a few problems with when we call
> wait_for_io_or_timeout(), and it also tries to send again when
> wait_for_io_or_timeout() succeeds.

[I'm in San Diego right now for the O'Reilly conference, so this
will be short.]

This doesn't work because you now need to adjust the sendfile params.
On FreeBSD/Solaris, EAGAIN means that it sent something - merely 
repeating the call to sendfile with the same parameters is bogus
(same data sent twice).

You need to adjust the parameters.  It's probably cheaper
to bail out and tell the caller how much was sent.  That was how
I interpeted the use cases of apr_sendfile.  There is no contract that
it'll send everything in one call.  -- justin


Mime
View raw message