Closed
Description
Jetty version(s)
11.0.9
Java version/vendor (use: java -version)
N/A
OS type/version
N/A
Description
When DefaultServlet
is instantiated, most of the properties of its ResourceService
retain their values unless they have been configured by an InitParameter
. This means the behaviour can be configured programmatically on the ResourceService
. However, this does not hold for the PrecompressedFormats
, which are always reset to defaults if no InitParameter
is set.
How to reproduce?
Given the following code, the PrecompressedFormats
will be ignored:
ResourceService resourceService = new ResourceService();
resourceService.setPrecompressedFormats(new CompressedContentFormat[]{
new CompressedContentFormat("bzip2", ".bz2"),
new CompressedContentFormat("gzip", ".gz"),
new CompressedContentFormat("br", ".br")
});
ServletHolder defholder = new ServletHolder(new DefaultServlet(resourceService));
context.addServlet(defholder, "/");
Metadata
Metadata
Assignees
Labels
For general bugs on Jetty sideFor general bugs on Jetty side