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
server/requestlog: request logging unconditionally consumes entire body #2848
Comments
Looks like this was done on purpose...? go-cloud/server/requestlog/requestlog.go Line 55 in 012388a
also refers to this behavior. Based on the comments, the tradeoff is incorrect request size being logged? |
It was the intent I had when writing the For context, I think the behavior should be (in order of preference):
I believe this represents the best compromise between giving an accurate request body size, not creating a DoS vector, and not altering the behavior of a handler that uses HTTP 100 Continue. WDYT? P.S. I am motivated to send a PR to fix this, as this affects a service I'm building. As a workaround, we can disable request logging, but I'd prefer not to. |
Offending lines:
go-cloud/server/requestlog/requestlog.go
Lines 84 to 88 in 012388a
For servers that take in large requests, especially those that rely on HTTP 100 Continue to bail early, this can cause a request to be stalled for much longer than necessary to reject a request.
The text was updated successfully, but these errors were encountered: