QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.69k stars 1.29k forks source link

[🐞] Server crashes when accessing URL with double slashes (//) #6840

Closed canaria-computer closed 3 weeks ago

canaria-computer commented 3 weeks ago

Which component is affected?

Qwik Runtime

Describe the bug

I am using the Qwik framework, and I have encountered an issue where accessing the URL http://localhost:5173// (http://\<origin>\/\/) causes the server to crash.

Reproduction

https://stackblitz.com/github/QwikDev/qwik-new-for-stackblitz?file=src%2Froutes%2Findex.tsx

Steps to reproduce

Typically, URLs containing double slashes or relative paths should return a 400 Bad Request or a 404 Not Found response instead of crashing the server.

  1. Set up a Qwik application.
  2. Start the development server.
  3. Access the URL http://localhost:5173//.

System Info

System:
    OS: Windows 11 10.0.22621
    CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
    Memory: 2.69 GB / 15.66 GB
  Binaries:
    Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.7.0 - C:\ProgramData\chocolatey\bin\pnpm.EXE
    bun: 1.1.23 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.98)
  npmPackages:
    @builder.io/qwik: ^1.8.0 => 1.8.0
    @builder.io/qwik-city: ^1.8.0 => 1.8.0
    typescript: 5.4.5 => 5.4.5
    undici: * => 6.19.8
    vite: 5.3.5 => 5.3.5

Additional Information

No response

JerryWu1234 commented 3 weeks ago

I will pick up this

gioboa commented 3 weeks ago

Thanks @canaria-computer for reporting your feedback and @JerryWu1234 for your help. It's a duplicate of #6004 so I close this one. Let's continue there.