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

CssLinkResourceTransformer breaks absolute paths [SPR-17432] #21965

Closed
spring-issuemaster opened this issue Oct 25, 2018 · 2 comments
Closed

CssLinkResourceTransformer breaks absolute paths [SPR-17432] #21965

spring-issuemaster opened this issue Oct 25, 2018 · 2 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Oct 25, 2018

Gareth Smith opened SPR-17432 and commented

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]


Affects: 5.0.6

Attachments:

Referenced from: commits 2146e13, 3b7c0fc

Backported to: 5.0.11

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Oct 25, 2018

Brian Clozel commented

Thanks for the report and the sample app, Gareth Smith!

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Oct 26, 2018

Gareth Smith commented

Thanks for the fix Brian Clozel That was super rapid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.