Interesting, we don't front with Apache, but we do have an F5 load
balancer.  Maybe it can add the "Content-encoding; gzip' response header.
Thanks for the idea!  In the meantime, I'll keep plugging away trying to
get Tomcat to do it correctly.  thanks again!

On Mon, Mar 9, 2015 at 4:01 PM, Igor Cicimov <icici...@gmail.com> wrote:

> On 10/03/2015 6:14 AM, "Victor Rodriguez" <victropo...@gmail.com> wrote:
> >
> > 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.
> >
> 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.
>



-- 
Sent from neither my iPhone nor my iPad.

Reply via email to