Repository navigation
fix(@angular/ssr): preserve trailing slashes in query and fragment of redirect URLs - #34512
Open
alan-agius4 wants to merge 2 commits into
Open
alan-agius4 wants to merge 2 commits into
alan-agius4 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the joinUrlParts utility function to correctly preserve trailing slashes within query parameters and URL fragments, ensuring they are not inadvertently stripped during URL normalization. The changes include logic to identify and isolate query and hash segments before processing the path, along with comprehensive test cases in url_spec.ts, app_spec.ts, and ng-routes_spec.ts to verify the fix. I have provided a suggestion to simplify the logic used to identify the suffix index for better readability.
… redirect URLs In redirect URLs, trailing slashes in query parameters or hash fragments should be preserved, while the path portion before the query or fragment continues to be normalized. Fixes angular#34511
alan-agius4
force-pushed
the
fix/ssr-redirect-query-trailing-slash
branch
from
October 23, 2026 18:28
096750d to
a77eadd
Compare
dgp1130
approved these changes
Oct 24, 2026
…ment of redirect URLs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In redirect URLs, trailing slashes in query parameters or hash fragments should be preserved, while the path portion before the query or fragment continues to be normalized.
Fixes #34511