Skip to content

vite ssr - spaces in url leads to different req.pathname #9446

@mkilpatrick

Description

@mkilpatrick

Describe the bug

Making a request in SSR mode to http://localhost:5173/indextest/dangiel1 leads to the req.originalUrl looking like
/indextest/dangiel1
but making a request to http://localhost:5173/index%20test/dangiel1 (note the %20 space) leads to:
/@id/__x00__/index%20test/dangiel1

Reproduction

N/A

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 954.67 MB / 64.00 GB
    Shell: 5.1.16 - /usr/local/bin/bash
  Binaries:
    Node: 17.9.0 - ~/.nvm/versions/node/v17.9.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v17.9.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v17.9.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Safari: 15.5

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: ssrp2-edge-caseBug, but has workaround or limited in scope (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions