Am 09.03.2015 um 23:11 schrieb Christopher Schultz:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Igor,

On 3/9/15 6:01 PM, Igor Cicimov 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 something else that can add this header for you?

Ironically, getting this to work as requested in Apache httpd is a
complete nightmare. The Tomcat solution basically works *exactly* as a
user would want it to work.

Agreed, that the feature in the default servlet is much much easier to use than configure pre-compressed content in httpd. But nightmare might be a bit to strong. It is tricky. See for example:

http://mail-archives.apache.org/mod_mbox/httpd-users/201110.mbox/%3c4e8e51c0.4050...@kippdata.de%3E

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to