On Sun, Jun 5, 2011 at 7:32 AM, Ben Noordhuis <i...@bnoordhuis.nl> wrote:

> On Sun, Jun 5, 2011 at 02:15, Joshua Marantz <jmara...@google.com> wrote:
> > On Sat, Jun 4, 2011 at 7:58 PM, Ben Noordhuis <i...@bnoordhuis.nl>
> wrote:
> >> Some popular OSS packages depend on Vary: User-Agent to make
> >> downstream proxies (reverse or forward) do the right thing.
> >
> > I'm pretty interested in deconstructing this further.  Can you be more
> > specific?   Which OSS packages?  Under what scenario would a proxy do the
> > wrong thing in the absence of Vary:User-Agent (other than, obviously,
> when
> > the content actually varies based on user-agent)?
>
> From first-hand experience (because I broke it): Magento, a popular
> PHP e-commerce framework. Magento (or one of its plug-ins) generates
> browser-tailored HTML and sets the Vary header to ensure that
> downstream proxies send the right HTML to the right client. If you
> remove or ignore the header, the layout of your site breaks.
>

This is a case where the content varies based on user-agent.  The
recommendation on the mod_deflate doc page is add vary:user-agent for any
non-image.  Can you think of a case where the absence of a vary:user-agent
header causes broken behavior when the content doesn't vary?

I'm not objecting to setting vary:user-agent when content varies: that's
what it's for.  I'm objecting to setting vary:user-agent when content does
*not* vary.  The mod_deflate documentation unambiguously recommends setting
vary:user-agent, and my feeling is that this is to work around a bug that
exists only in IE5 or pre-2007 patch of IE6.

-Josh

Reply via email to