-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
On 5/20/2010 5:16 PM, André Warnier wrote: > Christopher Schultz wrote: > ... >> >> I wonder if a patch could be written for the DefaultServlet to do >> something like this: if compression has been enabled on the <Connector>, >> the request is for file "foo", and "foo.gz" exists in the same location, >> use the "foo.gz" file as source instead of compressing on the fly. > > That is precisely what I was thinking of. > Of course I would not even dream of even attempting myself to patch the > DefaultServlet code.. The requirements for such a patch would need to be well-specified. Otherwise, you might have a security problem on your hands (DefaultServlet serves files other than those requested? This could be construed as a way around the <security-constraint>s in web.xml). I think a Filter is the right way to do things for the time being. In fact, you could even have the filter wrap the original request and tell the DefaultServlet that the filename is different. That way, you don't have to write your own stream-copying code, and things like "Range" headers should still work, but things get hairy with "Range" and not-so-transparent compression :) - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv2skYACgkQ9CaO5/Lv0PBeXQCeLIVTzZwNCBey6BGS9pVKFBv4 aqsAoJfk8iEVAWAqzOoMTwWADK5sA0u3 =A+vp -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org