httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Lu <chaos...@gmail.com>
Subject Re: [users@httpd] mod_cache + worker mpm + php-fpm mangling response headers on cache misses
Date Wed, 16 Sep 2015 12:50:29 GMT
Yes, looks like you're right. It seems odd that we have some paths that
assign r->headers_out and some that don't.

In any case, here is the updated patch. It may be worth opening this as a
bug report so we can keep track of it easier.



On Wed, Sep 16, 2015 at 3:47 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> Hi Ed,
>
> On Tue, Sep 15, 2015 at 10:10 PM, Edward Lu <chaosed0@gmail.com> wrote:
> > This looks like a bug. I believe I've tracked down the cause to a single
> > errant line in the cache module; can you apply the attached patch to
> 2.4.x
> > and see if it fixes the problem?
>
> I think the patch would also need this hunk:
>
> Index: modules/cache/mod_cache.c
> ===================================================================
> --- modules/cache/mod_cache.c    (revision 1703149)
> +++ modules/cache/mod_cache.c    (working copy)
> @@ -1462,6 +1462,7 @@ static apr_status_t cache_save_filter(ap_filter_t
>           * forward all of them to the client, including non-cacheable
> ones).
>           */
>          r->headers_out = cache_merge_headers_out(r);
> +        apr_table_clear(r->err_headers_out);
>
>          /* Merge in our cached headers.  However, keep any updated
> values. */
>          /* take output, overlay on top of cached */
> --
>
> Otherwise we might leave this path with some headers both in
> headers_out and err_headers_out.
>
> Regards,
> Yann.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message