-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceHttpRequestHandler with PathPatternParser cannot resolve resources with a jsessionid URL #27913
Comments
This is due to path matching strategy change to pattern based instead of ant. I've had same issue. Workaround is to configure ant_path_matcher as matching strategy. spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher https://gitter.im/spring-projects/spring-boot?at=61ae129e8f98cb0811aa9c04 |
Thanks for the reply, I will test this workaround. Nonetheless, I am still not sure what to think of this: AFAICT thymeleaf uses spring for URL rewriting. And spring rewrites the URLs into a format that spring can no longer process. How is this supposed to work with the new path matching strategy? |
I think this might be a Spring Framework issue. Thymeleaf is calling Spring Framework has a I'm not sure if the value of |
Transferring to the Framework team. Run the sample and do |
In most places we use |
A simple showcase of this error can be found here: https://github.com/bennypi/thymeleaf-and-springboot
Expected behaviour
The expected behaviour can be seen when changing the spring boot version to 2.5.6. With this version, the linked css
can be retrieved and the form POST is working.
Current behaviour
Starting with spring boot version 2.6.0 and still present in 2.6.1, requests with the jsessionid parameter are not processed correctly but lead to errors on the server. A call to a CSS-file with the jsessionid parameter leads to a 404, the form POST request with the jsessionid parameter also leads to a 404. The page starts working again when the page is refreshed in the browser because the browser then sends a cookie with in the request which in turn removes the jsessionid parameter in the links in the HTML.
I am not completely sure if this indeed a bug in spring boot or if thymeleaf must make changes so that it is compatible with spring boot 2.6.0 and newer, but I don't see anything in the release notes that could be a reason for this changed behaviour.
The text was updated successfully, but these errors were encountered: