Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 894086C2E for ; Sun, 5 Jun 2011 11:43:21 +0000 (UTC) Received: (qmail 91997 invoked by uid 500); 5 Jun 2011 11:43:21 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 91968 invoked by uid 500); 5 Jun 2011 11:43:21 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 91960 invoked by uid 99); 5 Jun 2011 11:43:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 11:43:21 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jmarantz@google.com designates 216.239.44.51 as permitted sender) Received: from [216.239.44.51] (HELO smtp-out.google.com) (216.239.44.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2011 11:43:14 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p55BgrZm003183 for ; Sun, 5 Jun 2011 04:42:53 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1307274173; bh=0ZHVF49M7TDwuoWIvCL6BM3uGvE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Content-Type; b=Ie9s+/NxvSOEEfyQYPkm4rpftJk5MtnfKHq1BoDc9j/qlqj5MVgIMG77oEsufiNQM RoHenxFCFqx+iuId4BUZw== Received: from pzk2 (pzk2.prod.google.com [10.243.19.130]) by kpbe14.cbf.corp.google.com with ESMTP id p55BgpdT019695 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 5 Jun 2011 04:42:52 -0700 Received: by pzk2 with SMTP id 2so1642991pzk.37 for ; Sun, 05 Jun 2011 04:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=v8sRe5q+iGQIewJE3eL3WHNWGvGO3gc3j+CrwezmS10=; b=IbaMDfhWuplq9gR6GZKdHlZw84cMCI470p+D/2OK6ryQOAPGT5jGDH++9dy55sZmXP YQAgZFtDSmYiLbVhfsYw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=mOs4UL+zFoVS4KO4RdYRCDFRvWdpHW6qBLQXORdc3+T813gBuczM4IWi46xOEIVmN0 jjoPHGZ0g8wCNDa5HO4Q== Received: by 10.143.153.18 with SMTP id f18mr824135wfo.114.1307274171450; Sun, 05 Jun 2011 04:42:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.44.9 with HTTP; Sun, 5 Jun 2011 04:42:31 -0700 (PDT) In-Reply-To: References: From: Joshua Marantz Date: Sun, 5 Jun 2011 07:42:31 -0400 Message-ID: Subject: Re: Vary:User-Agent, best practices, and making the web faster. To: "modules-dev@httpd.apache.org" Content-Type: multipart/alternative; boundary=001636e0a59e9d068404a4f57c4e X-System-Of-Record: true X-Virus-Checked: Checked by ClamAV on apache.org --001636e0a59e9d068404a4f57c4e Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jun 5, 2011 at 7:32 AM, Ben Noordhuis wrote: > On Sun, Jun 5, 2011 at 02:15, Joshua Marantz wrote: > > On Sat, Jun 4, 2011 at 7:58 PM, Ben Noordhuis > 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 --001636e0a59e9d068404a4f57c4e--