httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@ntrnet.net>
Subject Re: [PATCH] core_output_filter
Date Mon, 30 Sep 2002 23:46:54 GMT

I have committed a slightly modified version of this patch.

Ryan

On Fri, 20 Sep 2002, Ryan Morgan wrote:

> 
> I have a quick question about some of the logic in the core_output_filter.
> 
> When the core_output_filter sends data to the network (via writev_it_all,
> emulate_sendfile, or sendfile_it_all), we check the apr_status_t and log
> an error when rv != APR_SUCCESS.  However, apache only sets c->aborted if 
> the status code was ECONNABORTED, ECONNRESET, or EPIPE.  
> 
> Is there a reason we only set c->aborted for these specific return values?  
> I think it may make more sense to always set c->aborted if we encounter an 
> error.  This flag is the only way modules will know if something in the 
> filter chain went wrong.
> 
> A patch is attached to always set c->aborted on network send errors.
> (although I have only run into this problem with APR_TIMEUP errors, so
>  we could also just add a APR_STATUS_IS_TIMEUP(rv) check)
> 
> -Ryan
> 
> Index: core.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/server/core.c,v
> retrieving revision 1.205
> diff -u -r1.205 core.c
> --- core.c      16 Sep 2002 13:11:55 -0000      1.205
> +++ core.c      20 Sep 2002 20:46:52 -0000
> @@ -3910,11 +3910,7 @@
>              if (more)
>                  apr_brigade_destroy(more);
>  
> -            if (APR_STATUS_IS_ECONNABORTED(rv)
> -                || APR_STATUS_IS_ECONNRESET(rv)
> -                || APR_STATUS_IS_EPIPE(rv)) {
> -                c->aborted = 1;
> -            }
> +            c->aborted = 1;
>  
>              /* The client has aborted, but the request was successful. We
>               * will report success, and leave it to the access and error
> 

-- 

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------


Mime
View raw message