drogon icon indicating copy to clipboard operation
drogon copied to clipboard

HTTP/2 Client

Open marty1885 opened this issue 2 years ago • 1 comments

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

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

Final checks

  • [x] Refactor layout of HTTP 1 and HTTP/2 files
  • [x] Read through RFC 7540 and make sure behavior is correct
  • [x] 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

marty1885 avatar Apr 01 '23 10:04 marty1885

hi, Is there any progress?

nqf avatar Oct 18 '23 01:10 nqf