Skip to content

RSC / Routing Issue on Double Slashes #14583

@kalysti

Description

@kalysti

Reproduction

https://frontend.test.service.skypleasureltd.com//en//test2/test

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

Problem with loading data on double slahses.

Btw its not a exact match so it should be automaticly 404 but it detects a component which cannot resolve the data stream.

I try to prevent it with checking for double slashes in the middleware, unft. request.url is already "beautfified"

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 first 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

Also a problem that u can not capture double slashes in middleware to prevent this call

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions