Skip to content

RSC / Routing Issue on Double Slashes #14583

@kalysti

Description

@kalysti

Reproduction

Just open any route in sat or rsc with double shales. https://domain//en//test2/test

log-fetch.ts:26 GET https://en//test/test.manifest net::ERR_NAME_NOT_RESOLVED

System Info

7.9.6 React Router RSC

Used Package Manager

npm

Expected Behavior

404 instead of module loading

Actual Behavior

React router detects a component and try to load data which is impossible to load ;)

Problem comes from getManifestUrl
return new URL(${paths[0]}.manifest, window.location.origin);

window.location.origin -> mby we have here double // so it calls https:///test instead of https://domain/test.rsc or https://domain/test.maifest

Also a problem that is Not possible to capture double slashes in middleware to prevent this call, since middleware urls already beautified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions