This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-5--715057990
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On 30-Oct-06, at 10:49 AM, Dave Viner wrote:

> I'm trying to understand the full effect of the EnableSendfile
> directive. If I set the directive to 'Off', what happens when I
> invoke $r->sendfile($myfile) ??
>
> My hope is that the $r->sendfile will simply use mechanism other
> than sendfile() to read/send the given file (maybe allocate a
> buffer, read in file to buffer, send buffer, repeat until file is
> eof()... or something similar). But I've looked in the source, but
> I can't seem to convince myself that this will actually happen


$r->sendfile($myfile) ends up calling ap_send_fd()

ap_send_fd() checks the setting of EnableSendfile, and if it's on AND
APR_HAS_SENDFILE was detected,
it then calls apr_file_open with the APR_SENDFILE_ENABLED flag

See here http://apr.apache.org/docs/apr/group...e__io.html#ga3

But it's basically an advisory flag, saying please try and use
sendfile(), but nothing is guaranteed. In any case,
it will always fallback to something sane, sending the file one way
or another.


--Apple-Mail-5--715057990
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFRuuXyzKhB4jDpaURAs6wAJ9FuDRx3AvfD2iWb7Dy7T Dq2Ef9BQCeKig8
uGKsOALFnoOKkkSmHvUq+L0=
=qp52
-----END PGP SIGNATURE-----

--Apple-Mail-5--715057990--