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

HTTP/2 Client #1554

Merged
merged 154 commits into from
May 25, 2024
Merged

HTTP/2 Client #1554

merged 154 commits into from
May 25, 2024

Conversation

marty1885
Copy link
Member

@marty1885 marty1885 commented Apr 1, 2023

  • HPACK
    • Using HPacker for now
    • Replace HPacker with our own implementation
      • Moved from HPacker to eric-hpack to as HPacker has problems with encoding large amount of data
  • sending request
    • Send request body
    • Handle sending CONTINUATION frame
    • Handle sending body larger then window size
  • receiving response
    • Handle sending reading CONTINUATION frame
    • Anti request smuggling
    • handle bad sequence of frames
  • Handle stream termination from the server
    • GOAWAY
    • RST_STREAM
  • Reply to Ping
  • Stream control
    • Respect max concurrent stream
    • Track and update our window size
    • Kill all server pushs if received (we explicitly disables them, but heck)
    • RX window tracking and updating
    • TX window tracking and updating
  • Error handling mechanism
  • ~~compliance test ~~ No available compliance test server
  • Restart HTTP/2 connection when we run out of stream id
  • Add length check for all frame parsing to ensure asserts are not triggered.
  • Refactor to clean the client implementation up
    • Batch writes instead of calling send for each message
    • Look through the code and find possible integer overflows
    • Track bytes sent as required in the HTTP client API
  • Change API so version selection is made by the client, not by request
  • Reconnect the entire connection if we are running out of valid streamIds

Things to test before merging. Integration test won't catch any issues with HTTP/2 as drogon does not support HTTP/2 yet.

  • File upload
  • Download large files
    • Larger then initial window size
    • Larger then initial window size + window update increment
    • Larger then initial window size + window update increment * 2
    • Download large ISO from OpenBSD CDN
  • Send multiple, concurrent POST requests
  • Check sites work
    • google.com
    • example.com
    • clehaxze.tw (my blog, runs over nginx)
    • http2cdn.cdnsun.com
    • nasdaq.com
    • www.nchc.org.tw
    • amd.com
    • archlinux.org
    • openai.com
    • cloudflare.com
    • ietf.org
    • Google API services (tested against Gemini)
  • File downloading test:

Final checks

  • Refactor layout of HTTP 1 and HTTP/2 files
  • Read through RFC 7540 and make sure behavior is correct
  • Test on big endian machines

Notes

  • Will NOT support HTTP/2 over cleartext (h2c)
  • Trailer are treated as error
  • No support for server push promise
  • No priority support
  • Need major refactor to reuse code for HTTP/2 server. But good enough for now

@nqf
Copy link

nqf commented Oct 18, 2023

hi, Is there any progress?

@marty1885 marty1885 changed the base branch from master to http2-beta May 25, 2024 11:00
@marty1885 marty1885 merged commit 50838a9 into http2-beta May 25, 2024
31 checks passed
@an-tao an-tao deleted the h2-client branch May 26, 2024 06:12
@marty1885 marty1885 restored the h2-client branch June 12, 2024 15:17
@marty1885 marty1885 deleted the h2-client branch June 12, 2024 15:18
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