[chttp2] Tarpit invalid requests#34641
Merged
ctiller merged 19 commits intogrpc:masterfrom Oct 11, 2023
Merged
Conversation
markdroth
approved these changes
Oct 10, 2023
| auto* arena = GetContext<Arena>(); | ||
| auto hdl = arena->MakePooled<ServerMetadata>(arena); | ||
| hdl->Set(GrpcStatusMetadata(), GRPC_STATUS_UNKNOWN); | ||
| hdl->Set(GrpcMessageMetadata(), Slice::FromCopiedString(explanation)); |
Member
There was a problem hiding this comment.
Couldn't we use FromStaticString() in this case?
| // Error contract: the transport that gets this op must cause cancel_error | ||
| // to be unref'ed after processing it | ||
| grpc_error_handle cancel_error; | ||
| bool tarpit = false; |
| RemovedStreamHandle() = default; | ||
| explicit RemovedStreamHandle( | ||
| grpc_core::RefCountedPtr<grpc_chttp2_transport> t) | ||
| : transport_(t) { |
ctiller
added a commit
to ctiller/grpc
that referenced
this pull request
Oct 20, 2023
If a request is invalid, take a random amount of time before sending the RST_STREAM, so that MAX_CONCURRENT_STREAMS remaining becomes unpredictable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a request is invalid, take a random amount of time before sending the RST_STREAM, so that MAX_CONCURRENT_STREAMS remaining becomes unpredictable.