Bug 55945 - Support pre-compressed (gzip) resources with arbitrary file name extensions
Summary: Support pre-compressed (gzip) resources with arbitrary file name extensions
Status: RESOLVED DUPLICATE of bug 55946
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-01 18:20 UTC by Christopher Schultz
Modified: 2014-01-14 12:12 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Schultz 2014-01-01 18:20:40 UTC
Bug 54095 adds support for pre-compressed files, but the pre-compressed file needs to be the name of the originally-requested resource + ".gz". This isn't convenient for other file name patterns -- for example "*.svg" -> "*.svgz". Being able to specify a list of pattern mutations would be nice.
Comment 1 Mark Thomas 2014-01-09 14:31:30 UTC
The logic is very different between these cases.

Case 1:
 User requests A
 if user indicates they accept gzip encoding AND A.gz exists
   Return A.gz as A with an appropriate content-encoding header
 else
   return A

Case 2:
 User requests A
 if A has a .svgz extension
   if user indicates they accept gzip encoding
     return A + content-encoding header
   else
     return an error code
 else
  return A


While there are some common concepts, there is little/no overlap between these cases. I do not see a case for merging these use cases and maintain that handling of .svgz is best performed by a simple filter mapped to *.svgz until a more general solution (along the lines of https://java.net/jira/browse/SERVLET_SPEC-86) is provided by the container.
Comment 2 Christopher Schultz 2014-01-09 18:22:05 UTC
You're right in that the cases are different. I just wanted to point-out that related capabilities already exist in Tomcat.

I think the right was to do this is to put a Filter in the examples webapp.
Comment 3 Mark Thomas 2014-01-14 12:11:45 UTC
*** Bug 55943 has been marked as a duplicate of this bug. ***
Comment 4 Mark Thomas 2014-01-14 12:12:45 UTC

*** This bug has been marked as a duplicate of bug 55946 ***