jetty.project
jetty.project copied to clipboard
Jetty 12 : EE10 implement default servlet serving jetty-dir.css
Make ee10 DefaultServlet able to serve jetty-dir.css
We have to decide if we like this mechanism or not. If we do, ResourceCollection needs a way to be able to return the non-dir resources it contains from a call to resolve.
If we don't, jetty-dir.css needs to be served in some other way which involves making the ResourceContentFactory or its parent serve jetty-dir.css to avoid bypassing the CachingContentFactory that wraps ResourceContentFactory, i.e.: that logic cannot be in ResourceService unless we want to bypass CachingContentFactory.
ee9 is implemented by making DefaultServlet being able to serve jetty-dir.css, implement ResourceFactory and be wrapped by ResourceContentFactory.
Oh and favicon went away because it's supposed to be served by DefaultHandler, not by any DefaultServlet nor ResourceHandler.
See https://github.com/eclipse/jetty.project/issues/8443 and https://github.com/eclipse/jetty.project/issues/8456
We have to decide if we like this mechanism or not. If we do, ResourceCollection needs a way to be able to return the non-dir resources it contains from a call to resolve.
I don't understand? ResourceCollection has always been able to resolve non-dir resources. The complications in this PR appear to be from an effort to make a collection containing non-dir resources? what is the use-case for that?
If we don't, jetty-dir.css needs to be served in some other way which involves making the
ResourceContentFactoryor its parent serve jetty-dir.css to avoid bypassing theCachingContentFactorythat wrapsResourceContentFactory, i.e.: that logic cannot be inResourceServiceunless we want to bypassCachingContentFactory.
jetty-dir.css definitely needs to be served in some other way than having it part of a resource collection. It is a synthetic resource that "appears" to exist in every directory even if it is not there. It is best handled, as it was previously, with an interception of the URI before resolving the resource (or perhaps after a not found resource).
See commit e0a9c21, which added a directory test with commented out jetty-dir.css checks
This can be closed.