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

Ensure wire always contains a full H/2 frame (#15) #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Jun 10, 2024

Use atomic operations for reading frames.

If reading the payload of a frame times out (after reading the header), it puts the stream in an odd state.

Fixes #14.

Types of Changes

  • Bug fix.

Contribution

@ioquatix
Copy link
Member Author

ioquatix commented Jun 10, 2024

@maruth-stripe @fables-tales I'm considering this PR again.

Not only do we have instances of read_header + read_payload, we also have instances where we have continuation frames on the wire, which have no meaning once the original frames are read. The latter case concerns me, as we can't easily protect against that. We can still do our best to only read full frames, but that won't correspond to a full semantic interpretation of headers + continuation frames - and it isn't possible to read continuation frames in isolation.

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