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

CssLinkResourceTransformer breaks absolute paths

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.11, 5.1.2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Setup required to reproduce bug:

      • An application that is deployed at the webapp root - i.e. with an empty context path.
      • A css file being served by the application, via CssLinkResourceTransformer, within a non-top-level folder, e.g. /some/path/to/styles.css
      • An absolute url within that css file, e.g. /images/icon.png

      In this case, CssLinkResourceTransformer breaks the absolute path to the icon by turning it into /some/path/to/images/icon.png - i.e. the absolute path inside the the CSS file is intepreted as being a path that is relative to the CSS file itself.

      This seems like a bug to me. I have attached a test case: csslinkresourcetransformertest.zip

        Attachments

          Activity

            People

            Assignee:
            bclozel Brian Clozel
            Reporter:
            garethdanielsmith Gareth Smith
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 37 weeks ago