Open Dante-dan opened 1 year ago
I believe this has possibly been resolved with https://github.com/unjs/nitro/pull/1459. By using decodePath
from ufo
instead of decodeURIComponent
errors with invalid URIs will be caught and ignored.
If this is the expected behavior rather than throwing a 404, I think this can be closed.
Environment
nitropack: 1.0.0 nuxt3: 1.0.0 node: node18
Reproduction
nuxt3
Describe the bug
invalid url will cause 500 error, because
new URL()
. It shoud becatch
exception and throw not match 404.sample URl :
http://localhost:3000/.%AE/WEB-INF/esp_ldap_context.property
https://github.com/unjs/nitro/blob/8e06f2e4a65c6de0d2f2f3a5ef156ae3821ed60a/src/runtime/static.ts#L18~L22
Additional context
No response
Logs
No response