dgrr / http2

HTTP/2 implementation for fasthttp
Apache License 2.0
208 stars 35 forks source link

Fix stream state spec #34

Closed juliens closed 2 years ago

juliens commented 2 years ago

This PR fixes the "Stream and multiplexing" specification.

❯ ~/h2spec -t -k -p 8443 http2/5.1
Hypertext Transfer Protocol Version 2 (HTTP/2)
  5. Streams and Multiplexing
    5.1. Stream States
      ✔ 1: idle: Sends a DATA frame
      ✔ 2: idle: Sends a RST_STREAM frame
      ✔ 3: idle: Sends a WINDOW_UPDATE frame
      ✔ 4: idle: Sends a CONTINUATION frame
      ✔ 5: half closed (remote): Sends a DATA frame
      ✔ 6: half closed (remote): Sends a HEADERS frame
      ✔ 7: half closed (remote): Sends a CONTINUATION frame
      ✔ 8: closed: Sends a DATA frame after sending RST_STREAM frame
      ✔ 9: closed: Sends a HEADERS frame after sending RST_STREAM frame
      ✔ 10: closed: Sends a CONTINUATION frame after sending RST_STREAM frame
      ✔ 11: closed: Sends a DATA frame
      ✔ 12: closed: Sends a HEADERS frame
      ✔ 13: closed: Sends a CONTINUATION frame

      5.1.1. Stream Identifiers
        ✔ 1: Sends even-numbered stream identifier
        ✔ 2: Sends stream identifier that is numerically smaller than previous

      5.1.2. Stream Concurrency
        ✔ 1: Sends HEADERS frames that causes their advertised concurrent stream limit to be exceeded

Finished in 0.1335 seconds
16 tests, 16 passed, 0 skipped, 0 failed
dgrr commented 2 years ago

Thanks for your pull request!