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

Dot in URL leads to 404 #1684

Closed
lucaseverett opened this issue Jul 8, 2018 · 2 comments · Fixed by #2429
Closed

Dot in URL leads to 404 #1684

lucaseverett opened this issue Jul 8, 2018 · 2 comments · Fixed by #2429
Labels

Comments

@lucaseverett
Copy link

If a URL contains a dot in the path (Eg. http://localhost:1234/foo.bar), 404 is returned.

I came across this issue while working on a SPA that passes names that may contain a dot in the URL. Using encodeURIComponent doesn't work on dots since they are valid in a URL path. As a workaround I manually performed a replace of the dots to encode them.

This is due to line 56 in Server.js

Currently the Server is treating all paths with a dot as a file extension, and rather than sending the index it is attempting to serve an asset with that name.

Would it be safe to change that line to verify that an asset by that name exists in the bundle, and if it doesn't then default to index?

@devArun01
Copy link

devArun01 commented Sep 28, 2018

I got stuck with this issue for a while now. Will this be resolved?

@magcius
Copy link

magcius commented Dec 24, 2018

Ow. I was relying on this behavior in my project to send me 404s for static data file requests that didn't exist.

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

Successfully merging a pull request may close this issue.

4 participants