httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: bug in ap_get_client_block (wrong handling of EOS)
Date Wed, 14 May 2003 03:49:56 GMT
Stas Bekman wrote:
> ap_get_client_block API docs says:
> 
>  * @return Number of bytes inserted into the buffer.  When done reading, 0
>  *         if EOF, or -1 if there was an error
> 
> but this is bogus. If the EOS bucket arrives in the same bucket brigade 
> with real data, ap_get_client_block() will return the size of the read 
> data, completely missing the fact that EOS went through. Next it'll be 
> called again (because the caller wasn't signalled with EOF) and bad 
> things happen because there are no rules for how filters should behave 
> after they have processed EOS the last time they were called.

teach ap_get_client_block() to look for EOS before calling 
apr_brigade_flatten()...  the eos flag can probably be saved in 
core_request_config...




Mime
View raw message