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

URI encoding #20

Closed
Seb35 opened this issue Apr 6, 2019 · 1 comment
Closed

URI encoding #20

Seb35 opened this issue Apr 6, 2019 · 1 comment

Comments

@Seb35
Copy link
Contributor

Seb35 commented Apr 6, 2019

When the requested file name contains a space or any other non-ASCII character, sirv searches the file named with the percent-encoded name, e.g. if /my file.txt is requested, then sirv searches a file named my%20file.txt, which is not what is expected in the file system.

This occurs both in dev mode and in normal mode.

It can be fixed by adding uri = decodeURI(uri) or uri = decodeURIComponent(uri) -- I’m not sure what variant should be used here.

Seb35 added a commit to Seb35/sirv that referenced this issue Apr 6, 2019
@lukeed
Copy link
Owner

lukeed commented Apr 6, 2019

Hey, this is already to be fixed in next version. I've made it so that @poloa/url handles this (correctly) for all packages

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

No branches or pull requests

2 participants