http-2 1.1.0 has been released.
Pure Ruby, framework and transport agnostic, implementation of HTTP/2
protocol and HPACK header compression with support for:
* [Binary framing](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly)) parsing and
encoding
* [Stream multiplexing](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly))
and [prioritization](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly))
* Connection and stream [flow control](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly))
* [Header compression](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly)) and
[server push](HTTP: HTTP/2 - High Performance Browser Networking (O'Reilly))
* Connection and stream management
* And more... see [API docs](Processing http-2-1.2.0)
Protocol specifications:
* [Hypertext Transfer Protocol Version 2 (RFC 7540)](
RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2))
* [HPACK: Header Compression for HTTP/2 (RFC 7541)](
RFC 7541 - HPACK: Header Compression for HTTP/2)
Here are the updates since the last release:
## 1.2.0
### Improvements
A lot of optimizations around reducing allocated objects, avoiding
expensive frequent operations, and simpler data structures. A few
highlights:
* precompute huffman padding bytes.
* use `String#bytesplice` (when available) to save an intermediate string
in buffer ops.
* bookkeep header dynamic table offsets to improve lookups.
* streams recently closed: use `Hash#delete_if` with early break instead of
`Hash#delete_while` to avoid intermediate hash.
* Store frame flags as integers instead of arrays of symbols in frame
hashes.
* NOTE: while frame hashes are an internal representation, they get
exposed via `:frame_received` or `:frame_sent` callbacks. in case you're
relying on the `:flags` field, you'll have to adapt your code accordingly.
## 1.1.3
HTTP2::FrameBuffer#clear: clears the buffered data chunks
this API is useful for clients which want to react to a peer GOAWAY frame
by cleaning the buffer before closing the stream
## 1.1.2
* allow sending and receiving multiple GOAWAY frames, as per RFC 9113,
section 6.8
## 1.1.1
### Bugfixes
* frame buffer was accidentally changing encoding before header packing,
which raise invalid compatible encoding errors, due to usage of "String#".
this was fixed by using internal `append_str“, which does not touch
encoding, and calling `String.force_encoding` in case the buffer is a
mutable string passed by the user.
* dup PING frame payload passed by the user; while not really resulting in
invalid encoding, the change of the input string could surprise the caller,
since this would be expected to be stored somewhere so the peer PING frame
can be matched on receive.
### Improvements
Simplified `String#transition`, making sure it only does state machine
transitions (the rest is handled outside of it).