[ruby-talk:444836] [ANN] http-2 1.2.0 released
http-2 1.1.0 has been released. https://github.com/igrigorik/http-2 Pure Ruby, framework and transport agnostic, implementation of HTTP/2 protocol and HPACK header compression with support for: * [Binary framing](https://hpbn.co/http2/#binary-framing-layer) parsing and encoding * [Stream multiplexing](https://hpbn.co/http2/#streams-messages-and-frames) and [prioritization](https://hpbn.co/http2/#stream-prioritization) * Connection and stream [flow control](https://hpbn.co/http2/#flow-control) * [Header compression](https://hpbn.co/http2/#header-compression) and [server push](https://hpbn.co/http2/#server-push) * Connection and stream management * And more... see [API docs](https://www.rubydoc.info/gems/http-2) Protocol specifications: * [Hypertext Transfer Protocol Version 2 (RFC 7540)]( https://httpwg.github.io/specs/rfc7540.html) * [HPACK: Header Compression for HTTP/2 (RFC 7541)]( https://httpwg.github.io/specs/rfc7541.html) 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).
participants (1)
-
Tiago Cardoso