httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject mod_asis handler bug
Date Fri, 27 Jul 2001 15:57:51 GMT
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 one
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?

Bill


Mime
View raw message