Skip to content

fix: ensure path is encoded #800

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

Merged
merged 1 commit into from
Nov 15, 2021
Merged

fix: ensure path is encoded #800

merged 1 commit into from
Nov 15, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Nov 15, 2021

Summary

Ensure paths are URL-encoded. Uses the URL constructor, because it avoids double-encoding if the path is already encoded.

Test plan

  1. Visit the Deploy Preview, with a path that included a space or special character. Site should give a custom 404, rather than a 502 error

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal (small picture)

Closes #786

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 15, 2021
@ascorbic ascorbic requested a review from a team November 15, 2021 13:36
@kodiakhq kodiakhq bot merged commit b0f666e into main Nov 15, 2021
@kodiakhq kodiakhq bot deleted the mk/path-encoding branch November 15, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: URL encoded space in path causes ___netlify-handler function to 502
2 participants