Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 21130 invoked from network); 14 Mar 2011 17:28:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Mar 2011 17:28:31 -0000 Received: (qmail 53116 invoked by uid 500); 14 Mar 2011 17:28:31 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 53088 invoked by uid 500); 14 Mar 2011 17:28:31 -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 53080 invoked by uid 99); 14 Mar 2011 17:28:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 17:28:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of info@bnoordhuis.nl designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-gw0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 17:28:22 +0000 Received: by gwb19 with SMTP id 19so2455290gwb.18 for ; Mon, 14 Mar 2011 10:28:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.181.163 with SMTP id l23mr6909240yhm.153.1300123681163; Mon, 14 Mar 2011 10:28:01 -0700 (PDT) Received: by 10.147.40.4 with HTTP; Mon, 14 Mar 2011 10:28:01 -0700 (PDT) X-Originating-IP: [195.130.156.9] In-Reply-To: References: Date: Mon, 14 Mar 2011 18:28:01 +0100 Message-ID: Subject: Re: ordering output filters From: Ben Noordhuis To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Mar 14, 2011 at 16:54, Joshua Marantz wrote: > Even in the absence of 'remove_comments', it would be preferable to have > mod_pagespeed run after mod_includes so that it has an opportunity to > optimize the included text. =A0The user can achieve this by putting this = line > into his config file: > > =A0 =A0AddOutputFilter INCLUDES;MOD_PAGESPEED_OUTPUT_FILTER html > > But this is not desirable for a couple of reasons. =A0We'd like to force = the > correct order automatically if possible. > We also have a constraint that mod_pagespeed must run before mod_deflate. > =A0Actually mod_pagespeed already inserts mod_deflate in the filter-chain= to > run downstream of it: > > =A0ap_add_output_filter("DEFLATE", NULL, request, request->connection); mod_include runs at AP_FTYPE_RESOURCE, mod_deflate at AP_FTYPE_CONTENT_SET. If you register your filter at AP_FTYPE_RESOURCE + 1 or AP_FTYPE_CONTENT_SET - 1, it will run after mod_include but before mod_deflate.