tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Rodriguez <>
Subject [URGENT] Content-Encoding: gzip not set
Date Mon, 09 Mar 2015 19:12:45 GMT

I have some ALREADY gzipped files that I'm trying to serve up.

I have the following in my web.xml.


And, I have the following in my server.xml:

<Context docBase="/path/to/already-gzipped-json" path="/already-gzipped-json" />

>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.

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.

Sent from neither my iPhone nor my iPad.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message