-
-
Notifications
You must be signed in to change notification settings - Fork 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
Fix request count check for BadHttpMethod #10076
Conversation
This was incorrectly checking the first request ever instead of the first request for the connection #10055 (comment)
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #10076 +/- ##
=======================================
Coverage 98.76% 98.76%
=======================================
Files 121 121
Lines 36860 36866 +6
Branches 4396 4396
=======================================
+ Hits 36403 36409 +6
Misses 311 311
Partials 146 146
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #10076 will not alter performanceComparing Summary
|
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.
I'm still not convinced this will behave as desired. Clients that don't use keep alive (whether unsupported, or a proxy doesn't allow it etc.) will never result in the issue getting logged.
While anyone using a reverse proxy like nginx will likely gets loads of logs as the "client" is the proxy server, not the connecting user.
If I remember correctly I'm not sure what you are suggesting for the path forward. |
I think it's still very common to enable keepalive. Regardless, when disabled we'll never log, when enabled we'll almost always log. Neither is the intended behaviour.
Other than logging unconditionally as before, I don't have a better suggestion. Maybe when that other issue is fixed, users could customise this with a middleware? |
With a middleware they could choose to opt in to this behaviour, they could use the client IP from a trusted proxy header instead of per-connection etc. |
Yeah I think customization in #3287 probably the best way to handle this in the longer term. I think this PR is ok for the short term as its still logged at debug level so it should be discoverable if the user increases the logging level but considering this generates 100+ issues downstream when nothing is actually wrong I'd prefer to keep it at debug level as a log message isn't so valuable when the common case is noise. |
Yep, I think probably merge this for now as something reasonable. I think #3287 will be a breaking change and won't get backported (which is why I put in on the v4 milestone). So, then we can drop the debug logs in v4 when that is ready. |
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #10081 🤖 @patchback |
(cherry picked from commit fad44f6)
Backport to 3.12: 💚 backport PR created✅ Backport PR branch: Backported as #10082 🤖 @patchback |
(cherry picked from commit fad44f6)
…tpMethod (#10081) Co-authored-by: J. Nick Koston <[email protected]>
…tpMethod (#10082) Co-authored-by: J. Nick Koston <[email protected]>
The error handler was incorrectly checking for the first request of the server instead of the first request for the connection
#10055 (comment)