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 E0D8A1015A for ; Mon, 9 Mar 2015 22:02:28 +0000 (UTC) Received: (qmail 51297 invoked by uid 500); 9 Mar 2015 22:02:22 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 51223 invoked by uid 500); 9 Mar 2015 22:02:22 -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 51212 invoked by uid 99); 9 Mar 2015 22:02:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 22:02:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of icicimov@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 22:01:56 +0000 Received: by wgha1 with SMTP id a1so24781552wgh.1 for ; Mon, 09 Mar 2015 15:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hxRHrnnBYwfCLP3OvQsq7qJIqP1pC7QwOfdQt98Nm3E=; b=md5soChUfNmc3PebXvCFVUaGvBhVqCt0SuhLE8xTQAnOvYUABSAVkJvtVaUZTu8q42 J/I+mG+TzPDIUYJA7QXf4sOg4Kau8I7aHuR8MgaZhflkE4BUin/QGA/cm0YcYMQdNhgt Lrd9oyBcgcUV09blX1chnJ5JGsba9szd1uwcTKrzd79QUp4GUn3DMvlPsy3HChd5IlSa XYkRoWEZu3kMN1qPbE0kDAwXsfZFTPurs8pUlOL14m4lX4rwvhPzJpC9/Uonuap4Yr0N 9knxsNLBMC7Li4dVR6VXCwbxaApK/43eoIa/OysBrd0BGgglU5Qgq531Q47iHmE+Z6yd 0L1w== MIME-Version: 1.0 X-Received: by 10.180.8.10 with SMTP id n10mr62846149wia.79.1425938469942; Mon, 09 Mar 2015 15:01:09 -0700 (PDT) Received: by 10.28.49.68 with HTTP; Mon, 9 Mar 2015 15:01:09 -0700 (PDT) Received: by 10.28.49.68 with HTTP; Mon, 9 Mar 2015 15:01:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 Mar 2015 09:01:09 +1100 Message-ID: Subject: Re: [URGENT] Content-Encoding: gzip not set From: Igor Cicimov To: Tomcat Users List Content-Type: multipart/alternative; boundary=14dae9cc97c8f8fd9d0510e22b48 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cc97c8f8fd9d0510e22b48 Content-Type: text/plain; charset=UTF-8 On 10/03/2015 6:14 AM, "Victor Rodriguez" wrote: > > Greetings, > > I have some ALREADY gzipped files that I'm trying to serve up. > > I have the following in my web.xml. > > > json > application/gzip > > > > And, I have the following in my server.xml: > > > > > From the command line, I can curl the files and gunzip them just fine, so > they are coming across gzipped: > > curl http://localhost:8082/already-gzipped-json/fie.json | gunzip - > > However, requests coming from a web browser aren't handled correctly and > aren't legible in the browser, and I believe it's because Content-Encoding: > gzip is not in the response headers. > You mean Accept-Encoding, right? Is tomcat fronted by apache, nginx or sometning else that can add this header for you? If not then maybe just consider it as option if you can't solve it in tomcat although according to the comments you got here from people that are really experts it should be possible. > curl -I http://localhost:8082/already-gzipped-json/fie.json > > HTTP/1.1 200 OK > Server: Apache-Coyote/1.1 > Accept-Ranges: bytes > Last-Modified: Mon, 09 Mar 2015 17:15:29 GMT > Content-Type: application/gzip > Content-Length: 17905 > Date: Mon, 09 Mar 2015 19:11:06 GMT > > How do I tell Tomcat to include the Content-Encoding: gzip response > header? Again, these area ALREADY zipped files. I'm not interested in > Tomcat doing the gziping on the fly. > > Thanks! > -- > Sent from neither my iPhone nor my iPad. --14dae9cc97c8f8fd9d0510e22b48--