Skip to content

Conversation

@graebm
Copy link
Contributor

@graebm graebm commented Feb 25, 2020

  • Revamped decoder's callback API
    • Goal was to reduce logic required by users (connection & stream)
  • Add lots of tests. Each test runs 3 times:
    • Once decoding the input all at once
    • Once decoding the input "one byte at a time". This catches a lot of bugs.
    • Once decoding the input in 2 chunks, split at a specific byte. Re-run the test at every possible split.
      • This didn't turn up any new bugs, not 100% sure it's worth keeping these
  • Decoder State Machine changes & fixes:
    • Track the "header-block-in-progress" to make CONTINUATION frames work.
    • Flatten callstack.
      • Some states used to call into each other's function's recursively. Now they just switch the state and let the "state machine" run the next state.
    • Detect any time the payload is too big or small for a given frame type.
    • Lots of little tweaks and bugfixes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Run decoder over input in 2 chunks, split at a specific byte.
Re-run test at every possible split.
@graebm graebm merged commit ab1fb73 into master Feb 26, 2020
@graebm graebm deleted the h2-decoder-tests branch February 26, 2020 21:53
@graebm graebm mentioned this pull request Mar 23, 2020
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.

2 participants