httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: mod_asis handler bug
Date Fri, 27 Jul 2001 18:06:27 GMT

Why not just re-write it to make more sense?

apr_file_open()
apr_bucket_file_create()
apr_brigade_create()
APR_BUCKET_INSERT_HEAD()
apr_bucket_eos_create()
APR_BUCKET_INSERT_TAIL()
ap_pass_brigade()
return OK

Ryan

On Friday 27 July 2001 08:57, Bill Stoddard wrote:
> 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

-- 

_____________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
-----------------------------------------------------------------------------

Mime
View raw message