How to correctly buffer an HTTP/2 request into memory? #3839
Replies: 2 comments 2 replies
-
|
I thought we had used the word "hint" in the description, because that's what |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I'll just assume that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A cursory read of RFC 9113 seems to suggest that a request stream is closed iff a frame with END_STREAM set has been received. § 6.1 also states that an empty DATA frame with END_STREAM set is allowed to indicate the stream is over.
hyper/h2have some mechanism that checks for "an empty DATA frame attack"? For example a threshold of consecutive empty DATA frames that when exceeded causes an error?Body::is_end_streampresumably is based on a frame with END_STREAM set having been received. The documentation for that function explicitly states thatBody::poll_framecan returnPoll::Ready(None)even when this returnsfalse. This, in addition to my interpretation of RFC 9113, suggests to me that the body of a request that is to be buffered into memory should be based on thisbooland not based on whenNoneis received; howeverhttp_body_util::combinators::Collect::pollseems to (mis)interpretNoneas end of stream. Shouldn'tCollect::pollinstead returnPoll::ReadyiffT::is_end_streamreturnstrue? Perhaps it can have a threshold of consecutiveNones that when exceeded causes an error to be returned.Beta Was this translation helpful? Give feedback.
All reactions