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

Remove decodeUriParameters option #286

Merged
merged 1 commit into from
May 18, 2022

Conversation

ivan-tymoshenko
Copy link
Collaborator

Depends on #282

After merging #282, there would be no sense in this option. The decodeUriParameters option is used to optimize decoding non-Latin chars in path params. After #282 we won't parse params from the raw path but will parse them from the decoded path by the decodeURI function. The only chars that we will need to decode in params are # $ & + , / : ; = ? @ %. We can do it natively in the find-my-may in the most optimized way

function safeDecodeURIComponent (uriComponent, startIndex = 0) {
.

If you didn't add any side effects to this function, it doesn't change anything for you except increasing performance.

Fastify doesn't use the decodeUriParameters option.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ivan-tymoshenko ivan-tymoshenko force-pushed the remove-custom-uri-component-decoder branch from a5002f2 to 237825c Compare May 18, 2022 03:27
Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit fcd3e99 into main May 18, 2022
@ivan-tymoshenko ivan-tymoshenko deleted the remove-custom-uri-component-decoder branch May 18, 2022 08:51
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.

2 participants