-
Notifications
You must be signed in to change notification settings - Fork 27k
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
404 if static/
filename contains %
#11371
Milestone
Comments
kodiakhq bot
pushed a commit
that referenced
this issue
Sep 24, 2020
Prior to this pull request, Next.js would immediately decode all URLs sent to its server (via `path-match`). This was rarely needed, and Next.js would typically re-encode the incoming request right away (see all the `encodeURIComponent`s removed in PR diff). This adds unnecessary performance overhead. Long term, this will also help prevent weird encoding edge-cases like #10004, #10022, #11371, et al. --- No new tests are necessary for this change because we've extensively tested these edge cases with existing tests. One test was updated to reflect that we skip decoding in a 404 scenario. Let's see if all the existing tests pass!
HitoriSensei
pushed a commit
to HitoriSensei/next.js
that referenced
this issue
Sep 26, 2020
Prior to this pull request, Next.js would immediately decode all URLs sent to its server (via `path-match`). This was rarely needed, and Next.js would typically re-encode the incoming request right away (see all the `encodeURIComponent`s removed in PR diff). This adds unnecessary performance overhead. Long term, this will also help prevent weird encoding edge-cases like vercel#10004, vercel#10022, vercel#11371, et al. --- No new tests are necessary for this change because we've extensively tested these edge cases with existing tests. One test was updated to reflect that we skip decoding in a 404 scenario. Let's see if all the existing tests pass!
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
Static assets served from the
static/
folder will 404 if they contain URL-encodable symbols.To Reproduce
Expected behavior
Running the following:
Should respond with the file contents, not a 404.
Screenshots
System information
Additional Context
Related issue: #9705
Related PR: #10022
The text was updated successfully, but these errors were encountered: