Greetings,
I have some ALREADY gzipped files that I'm trying to serve up.
I have the following in my web.xml.
<mime-mapping>
<extension>json</extension>
<mime-type>application/gzip</mime-type>
</mime-mapping>
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.
Thanks!
--
Sent from neither my iPhone nor my iPad.