Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17535

ResourceUrlEncodingFilter versioning breaks when URL contains fragment

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.1.2
    • Fix Version/s: 5.1.3
    • Component/s: Web
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              neVERberleRfellerER Ondřej Kraus
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 25 weeks, 2 days ago