[email protected] wrote:
> Author: sf
> Date: Tue May 29 19:55:37 2012
> New Revision: 1343951
> 
> URL: http://svn.apache.org/viewvc?rev=1343951&view=rev
> Log:
> Merge r933919, r951222:
> 
> * Do not cache 206 responses in any case since we currently do not provide any
>   backends that are capable to cache partial responses. PR 49113.
>   Fixes regression of r724093.
> 
> Submitted by: minfrin
> Reviewed by: rjung, wrowe, sf
> 
> Modified:
>     httpd/httpd/branches/2.2.x/CHANGES
>     httpd/httpd/branches/2.2.x/STATUS
>     httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
>     httpd/httpd/branches/2.2.x/modules/cache/mod_disk_cache.c
>     httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c
> 

> Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c?rev=1343951&r1=1343950&r2=1343951&view=diff
> ==============================================================================
> --- httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c (original)
> +++ httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c Tue May 29 19:55:37 
> 2012
> @@ -473,7 +473,8 @@ static int cache_save_filter(ap_filter_t
>           * We include 304 Not Modified here too as this is the origin server
>           * telling us to serve the cached copy.
>           */
> -        if (exps != NULL || cc_out != NULL) {
> +        if ((exps != NULL || cc_out != NULL)
> +            && r->status != HTTP_PARTIAL_CONTENT) {
>              /* We are also allowed to cache any response given that it has a
>               * valid Expires or Cache Control header. If we find a either of
>               * those here,  we pass request through the rest of the tests. 
> From
> @@ -486,6 +487,9 @@ static int cache_save_filter(ap_filter_t
>               * include the following: an Expires header (section 14.21); a
>               * "max-age", "s-maxage",  "must-revalidate", "proxy-revalidate",
>               * "public" or "private" cache-control directive (section 14.9).
> +             *
> +             * But do NOT store 206 responses in any case since we
> +             * don't (yet) cache partial responses.
>               */
>          }
>          else {
> 

Sorry for chiming in that late
I don't think that this is the correct combination of the backports.
The r->status != HTTP_PARTIAL_CONTENT needs to move up one if condition such 
that the check allows to cache partial
responses in any case and let the providers deny it (like in trunk and 2.4).
The current patch never forwards a partial response to the providers and hence 
never triggers the code in the providers.

Regards

RĂ¼diger

Reply via email to