Skip to content

http2: handle 100-continue flow & writeContinue

This started out as work on tests and progressed into tackling 100-continue in http2. Not sure if it's even on the right track... still finding my way around the codebase. Hopefully not stepping on any toes here.

This adds an implementation for writeContinue based on the h2 spec & the existing http implementation. ClientHttp2Stream now emits a continue event when it receives headers with :status 100.

  • The current writeContinue implementation doesn't allow a callback and I'm not really sure how to tackle it given the notes in core about additionalHeaders & nghttp2.

  • Not sure if handleHeaderContinue is in the right spot or if I need to have any other safety checks in there. It seemed like onSessionHeaders already handles most of the heavy work in that regard.

  • The test case is adapted from the one for http and should be thorough. That's the one bit that should be good to go.

Thanks in advance!

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http2, test

Merge request reports

Loading