Skip to content
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

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

guseggert
Copy link
Contributor

No description provided.

@guseggert guseggert requested a review from ajnavarro December 5, 2022 22:12
@guseggert guseggert force-pushed the feat/routing-payload-limit branch from 30e59a1 to b56f989 Compare December 5, 2022 22:19
Copy link
Member

@ajnavarro ajnavarro left a 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

@guseggert
Copy link
Contributor Author

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.

@ajnavarro
Copy link
Member

@guseggert shall we limit at the server level too?

@ajnavarro
Copy link
Member

Not sure those apply? They are for servers handling reqs, not clients handling responses.

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.

@guseggert
Copy link
Contributor Author

@guseggert shall we limit at the server level too?

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?

@guseggert guseggert force-pushed the feat/routing-payload-limit branch from b56f989 to f7313cf Compare December 6, 2022 14:49
@guseggert guseggert force-pushed the feat/routing-payload-limit branch from f7313cf to 5e18db6 Compare December 6, 2022 14:50
@guseggert guseggert merged commit 1ea8dd1 into main Dec 7, 2022
@guseggert guseggert deleted the feat/routing-payload-limit branch December 7, 2022 12:41
@guseggert
Copy link
Contributor Author

part of ipfs/go-delegated-routing#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants