-
Notifications
You must be signed in to change notification settings - Fork 580
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
Add absolute check to url_for_asset and url_for_file to fix appending "/" to absolute file paths #2112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicates code that already exists in Mojolicious::Controller
. Just implement it the same way it is done in mojo.js.
I haven't seen any constants in Mojolicious (perl), wasn't sure if you'd like to pull the regex to a constant ala Mojo.js, but besides that this should be 1:1 with Mojo.js. |
d6ce386
to
e26ce8e
Compare
FWIW, I added this patch to our build and our tests started passing again. So, works for me :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Summary
There is currently a bug where:
produces
This PR adds an absolute check to the
file_path
andasset_path
methods that currently breaks this.Motivation
This is breaking multiple of my systems in production. (And it seems its breaking others as well)
References
#2107