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

Use encodeURIComponent() instead of escape() #18

Merged
merged 1 commit into from
Mar 29, 2018
Merged

Use encodeURIComponent() instead of escape() #18

merged 1 commit into from
Mar 29, 2018

Conversation

chorrell
Copy link

This solves a problem where URLs to objects that have "+" in the filename would throw a 404.

In our specific use case we have filenames with SemVer version info that includes build metadata e.g. product-1.0.0+1-1.zip

Also, the escape() function is deprecated so it's probably good to use encodeURIComponent() regardless: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features

This solves a problem where URLs to objects that have "+" in the filename would throw a 404.

In our specific use case we have filenames with SemVer version info that includes build metadata e.g. product-1.0.0+1-1.zip

Also, the escape() function is deprecated so it's probably good to use encodeURIComponent() regardless: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features
@john-aws john-aws merged commit 2202f06 into awslabs:master Mar 29, 2018
@john-aws
Copy link
Contributor

Thank you for this fix.

@john-aws
Copy link
Contributor

Note that this PR caused #25 so we will need to modify the underlying change.

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

Successfully merging this pull request may close these issues.

None yet

2 participants