Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FFC04A46 for ; Wed, 8 Jun 2011 15:11:21 +0000 (UTC) Received: (qmail 14127 invoked by uid 500); 8 Jun 2011 15:11:17 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 14028 invoked by uid 500); 8 Jun 2011 15:11:17 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 14019 invoked by uid 99); 8 Jun 2011 15:11:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 15:11:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2011 15:11:11 +0000 Received: from [192.168.245.129] (p549E8EE6.dip0.t-ipconnect.de [84.158.142.230]) by tor.combios.es (Postfix) with ESMTPA id 7D5792260C7 for ; Wed, 8 Jun 2011 17:10:48 +0200 (CEST) Message-ID: <4DEF90DF.3040900@ice-sa.com> Date: Wed, 08 Jun 2011 17:10:23 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: serving pre-compressed files References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jesse Farinacci wrote: > Greetings, > > I'm using Tomcat 7.0.14 and IBM Java 6. As part of my web > application's bundling mechanism (via Maven) I have the ability to > pre-gzip compress static resources. I'd like Tomcat to detect that a > request for /path/to/resource has /path/to/resource.gz available, and > serve the gzip'd content instead, if the user agent supports it. > > Is there anything like this available? If not, what suggestions do you > have? Thanks, > Suggestion : create a servlet filter to do this. But I would first check if the urlrewrite filter, at www.tuckey.org, cannot already do that. I would not be surprised. Do not forget in that case, that you will have to add a response header letting the client know that you are doing this (Transport-encoding: ?) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org