-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default 404 handler does not catch failure on bad characters in URL path #3804
Comments
Bad Url is handled by |
Fixed by #3128 |
OK, but does it make sense to put this message in the logs then?
I did spend a decent amount of time writing up this issue and recreating it, etc. only to have it closed so tersely. Could the error message indicate possible places to look such as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Fastify version
3.20.1
Plugin version
No response
Node.js version
16.14.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
12.3
Description
When a fastify server receives an incoming request containing certain character sequences, the server will return a 404 Not Found and indicates that the default 404 handler failed to catch the problem, requesting that it be reported. Here is the failure message, when a server running locally receives a request like this: http://localhost:8080/%C0.
I would expect a 404 to be returned in this case, but since it prints a request that it be reported, I am doing that.
Steps to Reproduce
The easiest way that I can spin up a fastify server is using the module
faas-js-runtime
, so instructions are here to do just that. But the problem should be reproducible with any fastify server.Create an
index.js
file containing the following contents.Then type the following command in that same directory.
The server should start, and begin listening on port 8080. You can validate that it is working correctly by typing
curl http://localhost:8080
in another terminal window. To recreate the problem type the following command.Expected Behavior
I would still expect to receive a 404 error, but I would not expect to see the mesage "this is likely a fastify bug, please report it" in my server logs.
The text was updated successfully, but these errors were encountered: