httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: svn commit: r1700578 - /httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c
Date Tue, 01 Sep 2015 14:33:31 GMT
Needs to be proposed in STATUS, even though there is no trunk revision
to reference.

On Tue, Sep 1, 2015 at 10:32 AM,  <elu@apache.org> wrote:
> Author: elu
> Date: Tue Sep  1 14:32:38 2015
> New Revision: 1700578
>
> URL: http://svn.apache.org/r1700578
> Log:
> Fix mod_mem_cache caching incomplete responses on connection abort
>
> Modified:
>     httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c
>
> Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c?rev=1700578&r1=1700577&r2=1700578&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c (original)
> +++ httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c Tue Sep  1 14:32:38 2015
> @@ -763,6 +763,15 @@ static apr_status_t store_body(cache_han
>                      return APR_EGENERAL;
>                  }
>              }
> +            if (r->connection->aborted) {
> +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
> +                             "mem_cache: Discarding body for URL %s "
> +                             "because connection was aborted.",
> +                             obj->key);
> +                /* No need to cleanup - obj->complete unset, so
> +                 * decrement_refcount will discard the object */
> +                return APR_EGENERAL;
> +            }
>              if (mobj->m_len > obj->count) {
>                  /* Caching a streamed response. Reallocate a buffer of the
>                   * correct size and copy the streamed response into that
>
>



-- 
Eric Covener
covener@gmail.com

Mime
View raw message