Skip to content
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

ResourceUrlEncodingFilter versioning breaks when URL contains fragment [SPR-17535] #22067

Closed
spring-issuemaster opened this Issue Nov 23, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 23, 2018

Ondřej Kraus opened SPR-17535 and commented

resolveUrlPath in ResourceUrlEncodingRequestWrapper in ResourceUrlEncodingFilter checks for query string, but not for fragment. This breaks versioning when URLs with fragment are used (tested with Thymeleaf):

th:src="@{/assets/images/icons/sprite.svg#face1}"

does not add version. Replacing getQueryParamsIndex with something that checks for both question mark and hash mark fixes it.


Affects: 5.1.2

Issue Links:

  • #17956 ResourceUrlProvider should only consider paths and not request parameters

Referenced from: pull request #2025, and commits 959cf61, 029101c

@arne-vandamme

This comment has been minimized.

Copy link

arne-vandamme commented Feb 15, 2019

@rstoyanchev We are running into the same issue with 4.3.x, is there any chance to backport the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.