httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: mod_asis handler bug
Date Fri, 27 Jul 2001 18:21:37 GMT
From: "Bill Stoddard" <>
Sent: Friday, July 27, 2001 10:57 AM

> In the mod_asis handler, we call:
> apr_file_open()
> ap_send_fd()
> apr_file_close()
> The problem is that the brigade created by ap_send_fd is not be flushed to the network
> before the apr_file_close (because we've not hit the min bytes to write threshold and
> of the filters is buffering).  I see a couple of solutions:
> 1. Not call apr_file_close() if we call ap_send_fd().  The bucket cleanup code will handle
> closing the file.
> 2. Chase the call to ap_send_fd() with a call to ap_rflush() and call apr_file_close
as is
> happening now.
> 3. Variation on 2)... Pass an additional option to ap_send_fd to specify whether to flush
> or not. And call apr_file_close() as is happening now.
> I am leaning toward 3 for this specific case.  This way, the handler can tell ap_send_fd
> to flush and be assured the bytes have been sent to the network before it returns.
> Thoughts?

None of the above?  Have ap_send_fd play the same game as a bucket, duping and refcounting
the file to a safe bucket?

View raw message