httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, Vodafone Group <>
Subject AW: mod_rewrite, vary headers and internal redirects
Date Mon, 23 Oct 2017 06:43:49 GMT
I would tend to say that the <If> code is correct and the RewriteCond code is wrong,
because it doesn’t matter if the condition becomes true or false. The headers value has
an influence on the result. Tricky question is what to do regarding Vary if the non-presence
of a header has an influence.



Von: Luca Toscano []
Gesendet: Sonntag, 22. Oktober 2017 11:47
An: Apache HTTP Server Development List <>
Betreff: Re: mod_rewrite, vary headers and internal redirects

Hi everybody,

2017-10-09 13:46 GMT+02:00 Luca Toscano <<>>:
Hi Yann,

2017-10-08 14:13 GMT+02:00 Yann Ylavic <<>>:
On Sun, Oct 8, 2017 at 2:03 PM, Yann Ylavic <<>>
> Hi Luca,
> On Sun, Oct 8, 2017 at 11:59 AM, Luca Toscano <<>>
>> Does this approach make sense? Is there any smarter way to do it?
> I can't tell that I love the hack in internal redirects but looks like
> a simple way to handle the case...
> Nit: maybe a more descriptive name for the "keep-vary-header" note,
> "redirect-keeps-vary"?


But after all, if we reach an internal redirect with some Vary header
already set, maybe we should never drop it, thus internal redirects
should preserve Vary in any case...

I'd prefer to limit the scope of the httpd configurations affected by this change to the minimum,
but the change would probably look less hacky :)

After trunk should be inline with what the docs say, but I
have another question now: a RewriteCond condition (containing something like HTTP:someheader)
adds a Vary header to the response only if the condition evaluates to true, meanwhile a <If>
condition adds the Vary header regardless. Is there any good motivation for this difference
or they should be modified to be more consistent? The <If> block behavior seems to be
more sound (after reading, but I'd like
to hear more expert opinions :)


View raw message