On Fri, 11 May 2001, Bill Stoddard wrote:
> This piece of code is still broken. We should not be calling
> apr_bucket_read() on a file bucket unless the file is less than
> AP_MIN_SENDFILE_BYTES.
This isn't strictly true. If the file is smaller than
AP_MIN_BYTES_TO_WRITE, and we are on a keepalive connection, then we will
read the file into memory. This is done so that we don't have to allocate
the file out of the connection pool.
What exactly are you seeing?
Ryan
>
> I'll look into this later because my head is exploding from a nasty sinus
> infection...
>
> Bill
>
> if ((!fd && !more &&
> (nbytes + flen < AP_MIN_BYTES_TO_WRITE) &&
> !APR_BUCKET_IS_FLUSH(e))
> || (nbytes + flen < AP_MIN_BYTES_TO_WRITE &&
> APR_BUCKET_IS_EOS(e) && c->keepalive)) {
> /* NEVER save an EOS in here. If we are saving a brigade with
> * an EOS bucket, then we are doing keepalive connections, and
> * we want to process to second request fully.
> */
>
> if (APR_BUCKET_IS_EOS(e)) {
> apr_bucket *bucket = NULL;
> /* If we are in here, then this request is a keepalive. We
> * need to be certain that any data in a bucket is valid
> * after the request_pool is cleared.
> */
> if (ctx->b == NULL) {
> ctx->b = apr_brigade_create(f->c->pool);
> }
>
> APR_BRIGADE_FOREACH(bucket, b) {
> const char *str;
> apr_size_t n;
>
> rv = apr_bucket_read(bucket, &str, &n, APR_BLOCK_READ);
>
>
>
_______________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------