-
Notifications
You must be signed in to change notification settings - Fork 844
Correctly track H2 post vio bytes #6401
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,12 +180,14 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame) | |
| if (nbytes + read_len > unpadded_length) { | ||
| read_len -= nbytes + read_len - unpadded_length; | ||
| } | ||
| nbytes += writer->write(myreader, read_len); | ||
| myreader->consume(nbytes); | ||
| int num_written = writer->write(myreader, read_len); | ||
| nbytes += num_written; | ||
| myreader->consume(num_written); | ||
| stream->update_read(num_written); | ||
| } | ||
| myreader->writer()->dealloc_reader(myreader); | ||
|
|
||
| if (frame.header().flags & HTTP2_FLAGS_DATA_END_STREAM) { | ||
| if (frame.header().flags & HTTP2_FLAGS_DATA_END_STREAM || stream->read_vio_done()) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks what we need 👍 ( Checking
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this VC_EVENT_READ_COMPLETE mean exactly? I'm a bit worried about trailing header, we don't support trailing header now though. What we really need to do might be scheduling READ_COMPLETE on END_STREAM carried by second HEADERS frame. This may explain a case we somehow miss READ_COMPLETE. https://tools.ietf.org/html/rfc7540#section-8.1.3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. ATS just set
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could reproduce the crash (what we saw on the docs) with a trailing header & setting
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // TODO: set total written size to read_vio.nbytes | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still a todo?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually, yes, still to do. As it stands with the origin needing to be chunked if nbytes is MAXINT on the H2 producer, the HttpTunnel logic updates the consumer write vio nbytes to the appropriate chunked size and as long as the EOS is set on the last data frame it is all ok. |
||
| stream->signal_read_event(VC_EVENT_READ_COMPLETE); | ||
| } else { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.