When a path is not matched in the serve command, a response is never returned to the client. This makes the server hang if there are a lot of requests to non-existent paths (for example, Chrome will sometimes automatically make a request to /favicon.ico).
This fix returns a 404 Not Found response to any request that isn't matched.
Type of Pull Request
[ ] Adding a feature
[x] Fixing a bug
[ ] Maintaining documents
[ ] Others ()
Verify the followings
[x] Code is up-to-date with the main branch
[x] No build errors after npm run build
[x] No lint errors after npm run lint
[x] No errors on using charites help globally
[x] Make sure all the exsiting features working well
[ ] Have you added at least one unit test if you are going to add new feature?
Description
When a path is not matched in the
serve
command, a response is never returned to the client. This makes the server hang if there are a lot of requests to non-existent paths (for example, Chrome will sometimes automatically make a request to/favicon.ico
).This fix returns a 404 Not Found response to any request that isn't matched.
Type of Pull Request
Verify the followings
main
branchnpm run build
npm run lint
charites help
globally