ResourceUrlEncodingFilter fails when Thymeleaf and the "/**" resource pattern is used [SPR-12630] #17231
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Christopher Savory opened SPR-12630 and commented
I could not get ResourceUrlEncodingFilter to work with Thymleaf templates. I believe the problem is that Thymleaf calls encodeURL on all of it's URLs, even standard links. What happens is that ResourceUrlEncodingFilter tries to look up resources of links and can't find them (because they don't exist, but are just mappings) and throws an exception.
I had to create my own filter based on ResourceUrlEncodingFilter that would only encode resources that had specific extensions I wanted encoded. It would be nice if ResourceUrlEncodingFilter used the same set of extensions supplied when the path patterns are supplied to ResourceHandlerRegistry.addResourceHandler and further, only those with a Transformer attached to it.
Affects: 4.1.3
Referenced from: commits spring-attic/spring-framework-issues@25f7f0d
The text was updated successfully, but these errors were encountered: