oak
oak copied to clipboard
Route errored on when decodeURI failed
How to reproduce
Use this URL below for testing:
curl http://localhost:8080/%
Error message is below:
request: { url: "http://localhost:8080/%", method: "GET", hasBody: false }
response: { status: 500, type: "text", hasBody: true, writable: true }
at decodeURI (<anonymous>)
at dispatch (https://jsr.io/@oak/oak/16.1.0/router.ts:1303:9)
at dispatch (https://jsr.io/@oak/oak/16.1.0/middleware.ts:90:13)
at composedMiddleware (https://jsr.io/@oak/oak/16.1.0/middleware.ts:93:12)
at Application.#handleRequest (https://jsr.io/@oak/oak/16.1.0/application.ts:605:32)
at Application.listen (https://jsr.io/@oak/oak/16.1.0/application.ts:853:28)
at eventLoopTick (ext:core/01_core.js:168:7)
[uncaught application error]: URIError - URI malformed
This case should be considered. It shouldn't just show an error.