tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Compressed SVG support (*.svgz) in Tomcat
Date Wed, 01 Jan 2014 18:36:10 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

avid,

On 12/31/13, 10:43 AM, David Law wrote:
> there's nothing to debate: the standard says svgz's need 
> Content-Encoding: gzip so thats what we have to do.
> 
> At this rate, we'll never get the Internet finished by Easter...

https://issues.apache.org/bugzilla/show_bug.cgi?id=55945

It just occurred to me that you could also use urlrewrite[1] to do
this. If you configure the Filter to match only .svgz files, then I
think you only need this configuration:

<rule>
  <set type="response-header" name="Content-Encoding">gzip</set>
</rule>

If you want to map the filter to more than that, then you'll want to
predicate the rule using <from>:

<rule matchtype="wildcard">
  <from>*.svgz</from>
  <set type="response-header" name="Content-Encoding">gzip</set>
</rule>

I haven't tested any of this. It will probably require some tweaking.

I was going to add an enhancement request to Bugzilla for a Filter
like the one Mark wrote, but I figured that urlrewrite could do it,
too. Perhaps such a filter would still be a good example.

https://issues.apache.org/bugzilla/show_bug.cgi?id=55946

- -chris

[1] http://www.tuckey.org/urlrewrite/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSxGAWAAoJEBzwKT+lPKRYYhEQAI4/5XoPs05NXaxViPMTn+en
UuLyjnzfbCS85Szr+PaoAFze2f8UwOpRpBYk+Xy9Gms6Zs/Nr+STDiDZ2MxiPw6K
LoKPxQJIh4Lt54kD6OuqdO1dr5Umf1Bs2cQ2k2o2ntK1BwV7hw+UOSVSLGEq4biM
ByG2YCttB4dR5elL2ykjjgxpiqlCbeYS5iWQTtAoKX78jM0Ti7nuLwn51oYCrAgS
VNz73VXm8NFM1y5sxbmUsqmm28HrXWjk0B5kaqeT7xRwCxkuvNf7eHvfCu/qIE/c
2EiEbMaEij2kk9Geldo+Tn6pmXM6gVAOeqTQwylqhOe34mWd8iLsp3QF5erc+XgQ
ktcQoNfPcnUulFmIm+EAg4HUyvLwE0RIXj/yRAs3CbvUupgxeyxO/yLcdukaKh+O
7cT5JKPBFm0uoUjZW0OcDfkvND2r4PvcRrSeauH6yUMuDsAocDQbUTD+n89NPbVh
iVvQsxNLY1x2Eu5cJ1niMpR6HRtGjyusZVQyBW5M4q1p9im100eTIW3MXcviB4xr
c3uOo/D73Xci5h+MjfFY8KAgjsw2KMCgIGuzVYU5c3CHG5hVk4OPAFXMtIP/NE83
ORE4PJbdTad/oQaPd4I5r2ugcPZno4GFIB67IOxgy3MZgsoX9Y81B0vU8AsK1fj9
G8XTtkNXOibqh2rX/06T
=54if
-----END PGP SIGNATURE-----

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


Mime
View raw message