httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Mon, 26 Jun 2000 20:39:34 GMT
I concur, which is why I deferred fixing the r->finfo.size bug.

Cheers,
-g

On Mon, Jun 26, 2000 at 01:30:53PM -0700, rbb@covalent.net wrote:
> 
> This should really be shelved until the filtering is finished, because I
> think the whole approach to how we write to the network is about to change
> drastically.
> 
> Ryan
> 
> 
> On Mon, 26 Jun 2000, Bill Stoddard wrote:
> 
> > I've given this a bit of thought. ap_sendfile should be broken out of ap_send_fd()
and the
> > default handler needs to be rewritten to accomodate a runtime check to use either
> > ap_send_fd(), ap_send_mmap() or ap_sendfile(), depending on:
> > 
> > - the platform support for sendfile (win95/98 vs NT for example)
> > - whether SSL is being used
> > - whether filtering is being used
> > - whether character set translation is being used.
> > - ? any other case where you cannot or do not want to use sendfile
> > 
> > Updating the iol function pointer is a feasible approach (provided you never attempt
to
> > push iol's into APR) .
> > 
> > Bill
> > 
> > > Actually, that code is quite broken. I intended to get it fixed after the
> > > filtering stuff was in (and ap_send_fd[_length] would move elsewhere).
> > >
> > > The problem is that the file specified by "fd" might NOT be the same file as
> > > referenced by r->finfo.
> > >
> > > It also seems a bit wierd to test for APR_HAS_SENDFILE. It would be nicer to
> > > check for iol->iol_sendfile to be non-NULL. That allows an APR
> > > implementation to define a sendfile replacement, to use a real sendfile, or
> > > to leave it blank (and Apache will fall back to a slower route).
> > >
> > > Cheers,
> > > -g
> > >
> > > On Mon, Jun 26, 2000 at 05:25:55PM -0000, trawick@locus.apache.org wrote:
> > > > trawick     00/06/26 10:25:54
> > > >
> > > >   Modified:    src/main http_protocol.c
> > > >   Log:
> > > >   Fix the type of the 5th argument to iol_sendfile().
> > > >
> > > >   Revision  Changes    Path
> > > >   1.88      +1 -1      apache-2.0/src/main/http_protocol.c
> > > >
> > > >   Index: http_protocol.c
> > > >   ===================================================================
> > > >   RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
> > > >   retrieving revision 1.87
> > > >   retrieving revision 1.88
> > > >   diff -u -r1.87 -r1.88
> > > >   --- http_protocol.c 2000/06/24 19:31:41 1.87
> > > >   +++ http_protocol.c 2000/06/26 17:25:52 1.88
> > > >   @@ -2240,7 +2240,7 @@
> > > >     */
> > > >    API_EXPORT(long) ap_send_fd(ap_file_t *fd, request_rec *r)
> > > >    {
> > > >   -    long len = r->finfo.size;
> > > >   +    ap_size_t len = r->finfo.size;
> > > >    #if APR_HAS_SENDFILE
> > > >        if (!r->chunked) {
> > > >    ap_status_t rv;
> > > >
> > > >
> > > >
> > >
> > > --
> > > Greg Stein, http://www.lyra.org/
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message