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
fix: default clientError replies on reused connection (#4101) #4133
fix: default clientError replies on reused connection (#4101) #4133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
0ee66a1
to
899442b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
When fastify server receives request with invalid url in a reused connection, it closes the connection instead of 400 Bad Request reply. The closed connection is then propagated by load balancer (ALB) as 502 error. This turns client errors into closely monitored server errors. `socket.bytesWritten` is never going to be 0 on reused connection.
899442b
to
588f219
Compare
@mcollina Can this fix be back ported to v3 please? |
We maintain security related fixes on prior major releases according to https://github.com/fastify/fastify/blob/cd20280bed489fe4cdae91b447088c31dcb87916/docs/Reference/LTS.md If you'd like to take on the work and submit a PR, we will certainly consider it. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When fastify server receives request with invalid url
in a reused connection, it closes the connection
instead of 400 Bad Request reply.
The closed connection is then propagated by load balancer (ALB)
as 502 error. This turns client errors into closely monitored
server errors.
socket.bytesWritten
is never going to be 0 on reused connection.Checklist
npm run test
andnpm run benchmark
and the Code of conduct