Problem/Motivation
If you make a request to for a route which is a redirect to the decoupled router the fragment potion of the URL will be removed. This can and should be maintained.
This is a per the RFC https://www.rfc-editor.org/rfc/rfc7231#section-7.1.2
If the Location value provided in a 3xx (Redirection) response does
not have a fragment component, a user agent MUST process the
redirection as if the value inherits the fragment component of the
URI reference used to generate the request target (i.e., the
redirection inherits the original reference's fragment, if any).
Note that the Redirect module doesn't have to worry about this because this happens at the browser level but it is different for the decoupled router.
Steps to reproduce
Make a request with a path that redirects and add a fragment.
Proposed resolution
Preserve the fragment unless the redirect adds one.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Issue fork decoupled_router-3545398
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexpott#3543594: Redirects to URLs with query strings and redirect query passthrough enabled is broken rewrites the redirect event listener so this will be addressed once that one has landed.
Comment #3
alexpottThis is ready for review now.
Comment #5
mglamanAdded to the merge train! Thanks