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. There are CPAN modules and Rack middleware that do similar things and no doubt other software too.