|
For now, here's my line of thought:
- DamDownloadServlet should implement SelfMappingServlet (see
MAGNOLIA-5708)
- It should still support dam-static, but maybe just check for the word "static" in the servletPath
- Use request.getServletPath() to know what to do (rather than try to "smartly" parse AggregationState.currentURI - the container did that for you !), i.e "normal" request or -static.
- Use request.getPathInfo() to know what asset to load (same reasons)
- @Inject rather than use Components
- Existing URLs should still be supported (i.e those that may or may not have had a complete asset key (prov:id) from previous versions
- TBD: should URLs be /<servlet-mapping>/<asset-key>/<filename>, or omit the filename ?
- TBD: if we use filename in URLs, should it be mandatory, validated ? (is it a potential security issue, or should we just ignore anything after <asset-key> ?
- TBD: if we use filename in URLs, clarify what the AssetUtil.replaceSpecialCharacters and AssetUtil.getEncodedFileName were doing, if/how that's necessary, and relocate/rewrite those in an appropriate place.
|