httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: svn commit: r1233882 - /httpd/httpd/trunk/server/core_filters.c
Date Fri, 20 Jan 2012 13:56:28 GMT
On Fri, Jan 20, 2012 at 7:41 AM,  <jorton@apache.org> wrote:
> Author: jorton
> Date: Fri Jan 20 12:41:18 2012
> New Revision: 1233882
>
> URL: http://svn.apache.org/viewvc?rev=1233882&view=rev
> Log:
> * server/core_filters.c (ap_core_input_filter): Only treat EAGAIN as
>  success if a non-blocking read was requested; for a blocking read,
>  it is an error condition.

In case anyone remembers:  Is this the same area discussed by
Jim+Joe+Jeff at AC2011 based on Jim's Jenkins testcase?

>
> Modified:
>    httpd/httpd/trunk/server/core_filters.c
>
> Modified: httpd/httpd/trunk/server/core_filters.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core_filters.c?rev=1233882&r1=1233881&r2=1233882&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/core_filters.c (original)
> +++ httpd/httpd/trunk/server/core_filters.c Fri Jan 20 12:41:18 2012
> @@ -137,7 +137,7 @@ int ap_core_input_filter(ap_filter_t *f,
>          * empty).  We do this by returning whatever we have read.  This may
>          * or may not be bogus, but is consistent (for now) with EOF logic.
>          */
> -        if (APR_STATUS_IS_EAGAIN(rv)) {
> +        if (APR_STATUS_IS_EAGAIN(rv) && block == APR_NONBLOCK_READ) {
>             rv = APR_SUCCESS;
>         }
>         return rv;
> @@ -223,7 +223,9 @@ int ap_core_input_filter(ap_filter_t *f,
>         e = APR_BRIGADE_FIRST(ctx->b);
>         rv = apr_bucket_read(e, &str, &len, block);
>
> -        if (APR_STATUS_IS_EAGAIN(rv)) {
> +        if (APR_STATUS_IS_EAGAIN(rv) && block == APR_NONBLOCK_READ) {
> +            /* getting EAGAIN for a blocking read is an error; for a
> +             * non-blocking read, return an empty brigade. */
>             return APR_SUCCESS;
>         }
>         else if (rv != APR_SUCCESS) {
>
>



-- 
Born in Roswell... married an alien...

Mime
View raw message