-
Notifications
You must be signed in to change notification settings - Fork 100
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
routing/http: feat: limit the resp body payload #9
Conversation
30e59a1
to
b56f989
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.
We could/should use the standard go API to do this. We have a wrapping handler https://pkg.go.dev/net/http#MaxBytesHandler or a reader https://pkg.go.dev/net/http#MaxBytesReader
Not sure those apply? They are for servers handling reqs, not clients handling responses. |
@guseggert shall we limit at the server level too? |
Yeah, you are right, for me it is strange that there is no standard way to do this on the client side, having helpers on the server side. |
Yeah we could, I was focused purely on client here since that is what we are imminently shipping, mind if I follow-up with this in a separate commit? |
b56f989
to
f7313cf
Compare
f7313cf
to
5e18db6
Compare
part of ipfs/go-delegated-routing#63 |
No description provided.