[ruby-talk:444861] [ANN] http-2 1.3.0 released
http-2 1.3.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.3.0 ### Improvements * PRIORITY frame handling will create the stream object, but not yielded it to the user via the `:stream` callback; it'll eventually be yielded by the time the corresponding HEADERS frame comes in. * internally, settings are stored in struct objects, which improve memory usage and methods lookups when compared to the previous Hash representation, and should reduce the potential for typos. ### Bugfixes * Fixed handling of the SETTINGS_HEADER_TABLE_SIZE setting, which besides setting the max table size on the wrong encoder, was doing so without sending back the table size update in the subsequent header block. * The SETTINGS_MAX_HEADER_LIST_SIZE setting is now enforced, gating the header block decoding flow; the setting renegotiation is therefore not ignored anymore. * PUSH_PROMISE streams are now disallowed for clients, and discarded when SETTINGS_ENABLE_PUSH is set to 0 on servers. It also respects the SETTINGS_MAX_CONCURRENT_STREAMS setting. ### Internal changes * `HTTP2::Compressor` and `HTTP2::Decompressor`'s `#table_size=` method renamed to `#max_table_size=`. It's an API breaking change, but from components considered internal to the core. ### Chore * HPACK conformance tests were (re)added to the test suite. ## 1.2.3 ### Improvements Connection and HPACK settings are now kept in a Settings container object, a struct-like class; this improves storage of settings (Struct objects use less memory than Hashes), reduces allocations (previously, some of the hashes had to merge with defaults downstream), and improves lookups (Struct accessors > Hash lookups). ### Bugfixes * h2c initiated streams will now correctly close the request stream for body-less (like-GET) requests. * negative stream ids are now checked against. * negative or 0 WINDOW_UPDATE increments are now checked against. * memory leak fixed around streams recently closed bookkeeping. ### Chore LICENSE file was accidentally left out of previous release bundles. ## 1.2.2 ### Bugfixes * allow completion of streams lower than last stream id after receiving a GOAWAY frame for stream 0 (connection), in conformance with RFC 9113 Section 6.8. * in the process, a new connection state, `:closing`, has been introduced, to identify connections which do not accept new streams BUT allow existing streams to be processed to completion, and will also process control-flow frames to aid in the process. A note that the public API `HTTP2::Connection#closed?` will also return true for that new state (besides `:closed`). * local and remote SETTINGS_MAX_CONCURRENT_STREAMS setting is now enforced correctly, i.e. the client should not allow the creation of new streams based on the remote setting, whereas the local setting will be applied by the server side when activating a stream. ## 1.2.1 * fix: encode the string to binary when using `String#bytesplice` (if the string is UTF-8 and the range would split multibyte characters, bytesplicing raises an error).
participants (1)
-
Tiago Cardoso