Skip to main content

http2 3.2.0 copy "http2: ^3.2.0" to clipboard
http2: ^3.2.0 copied to clipboard

A HTTP/2 implementation in Dart.

3.2.0 #

  • Add Settings.connectionWindowSize and Settings.maxFrameSize to configure the connection-level receive window and SETTINGS_MAX_FRAME_SIZE. (#1997)
  • Apply a larger streamWindowSize and maxFrameSize to the receive side as soon as they are sent, and acknowledge received data once per half window when the window is at least twice 65535 bytes.
  • Honor the peer's SETTINGS_MAX_FRAME_SIZE when sending; the ACK of our own SETTINGS_INITIAL_WINDOW_SIZE no longer resizes send windows.
  • Never send a WINDOW_UPDATE with an increment of 0.
  • Replenish the connection-level receive window and release active stream slots when a stream with buffered unconsumed DATA frames is terminated, reset, or its incoming subscription is cancelled.
  • Ignore PRIORITY and unknown extension frames on open, idle, and closed streams, and treat SETTINGS, PING, and GOAWAY frames with a non-zero stream ID as a connection-level PROTOCOL_ERROR.
  • Fix sendData(..., endStream: true) stalling forever when the data exceeds the peer's flow-control window (#1998).
  • Deliver the complete response instead of a StreamTransportException when the peer sends RST_STREAM(NO_ERROR) after END_STREAM (RFC 9113 Section 8.1).
  • Never write a RST_STREAM before the still-queued HEADERS of the same stream when a stream is cancelled; drop the stream's queued DATA instead.
  • Http2Client propagates pausing a response body to the underlying HTTP/2 stream, so a slow reader stops the server at the flow-control window instead of buffering the whole response in memory, and uses a 4 MiB stream / 16 MiB connection receive window instead of the protocol's 64 KiB defaults.
  • Stop head-of-line blocking HEADERS, RST_STREAM, and GOAWAY behind DATA that is waiting for connection-level flow-control credit.
  • StreamException (a stream reset because of a GOAWAY or oversized headers) now extends StreamTransportException, as documented for TransportException subclasses. MultiProtocolHttpServer.startServing forwards an unexpected ALPN protocol to onError instead of throwing inside the socket listener.
  • Bound peer-initiated concurrent streams and reject peers that ignore the advertised SETTINGS_MAX_CONCURRENT_STREAMS value. Reserved peer streams are also bounded locally. The default limit is 100.
  • Bound inbound compressed field blocks, decoded field sections, CONTINUATION frame counts, and incomplete field-block duration. HPACK decoding continues in discard mode after the decoded limit is exceeded so the connection-wide compression context remains synchronized. By default, compressed field blocks and decoded field sections are limited to 256 KiB, matching Chromium, and field blocks to 64 CONTINUATION frames.

3.1.0 #

  • Gracefully handle receiving headers on a stream that the client has canceled. (#1799)
  • Treat incoming server push streams as connection protocol error when pushes are disabled (SETTINGS_ENABLE_PUSH=0).
  • Enforce the locally advertised SETTINGS_MAX_CONCURRENT_STREAMS limit on incoming remote streams.
  • Add Http2Client (package:http2/client.dart), a pooled, multiplexed package:http Client backed by HTTP/2 connections.
  • Add ClientTransportConnection.peerMaxConcurrentStreams, exposing the peer's most recently advertised SETTINGS_MAX_CONCURRENT_STREAMS. Note this is a new member on an implementable class, so any existing implements ClientTransportConnection will need updating.

3.0.0 #

  • Require Dart SDK 3.7.0.
  • Add support for providing custom message when terminating a connection.

2.3.1 #

  • Require Dart 3.2
  • Add topics to pubspec.yaml
  • Move to dart-lang/http monorepo.

2.3.0 #

  • Only send updates on frames and pings being received when there are listeners, as to not fill up memory.

2.2.0 #

  • Transform headers to lowercase.
  • Expose pings to connection to enable the KEEPALIVE feature for gRPC.

2.1.0 #

  • Require Dart 3.0.0
  • Require Dart 2.17.0.
  • Send WINDOW_UPDATE frames for the connection to account for data being sent on closed streams until the RST_STREAM has been processed.

2.0.1 #

  • Simplify the implementation of MultiProtocolHttpServer.close.
  • Require Dart 2.15.0.

2.0.0 #

  • Migrate to null safety.

1.0.1 #

  • Add TransportConnection.onInitialPeerSettingsReceived which fires when initial SETTINGS frame is received from the peer.

1.0.0 #

  • Graduate package to 1.0.
  • package:http2/http2.dart now reexports package:http2/transport.dart.

0.1.9 #

  • Discard messages incoming after stream cancellation.

0.1.8+2 #

  • On connection termination, try to dispatch existing messages, thereby avoiding terminating existing streams.

  • Fix ClientTransportConnection.isOpen to return false if we have exhausted the number of max-concurrent-streams.

0.1.8+1 #

  • Switch all uppercase constants from dart:convert to lowercase.

0.1.8 #

  • More changes required for making tests pass under Dart 2.0 runtime.
  • Modify sdk constraint to require '>=2.0.0-dev.40.0'.

0.1.7 #

  • Fixes for Dart 2.0.

0.1.6 #

  • Strong mode fixes and other cleanup.

0.1.5 #

  • Removed use of new Function syntax, since it isn't fully supported in Dart 1.24.

0.1.4 #

  • Added an onActiveStateChanged callback to Connection, which is invoked when the connection changes state from idle to active or from active to idle. This can be used to implement an idle connection timeout.

0.1.3 #

  • Fixed a bug where a closed window would not open correctly due to an increase in initial window size.

0.1.2 #

  • The endStream bit is now set on the requested frame, instead of on an empty data frame following it.
  • Added an onTerminated hook that is called when a TransportStream receives a RST_STREAM frame.

0.1.1+2 #

  • Add errorCode to exception toString message.

0.1.1+1 #

  • Fixing a performance issue in case the underlying socket is not writeable
  • Allow clients of MultiProtocolHttpServer to supply [http.ServerSettings]
  • Allow the draft version 'h2-14' in the ALPN protocol negogiation.

0.1.1 #

  • Adding support for MultiProtocolHttpServer in the package:http2/multiprotocol_server.dart library

0.1.0 #

  • First version of a HTTP/2 transport implementation in the package:http2/transport.dart library

0.0.1 #

  • Initial version
97
likes
150
points
971k
downloads

Documentation

API reference

Publisher

verified publisherdart.dev

Weekly Downloads

A HTTP/2 implementation in Dart.

Repository (GitHub)
View/report issues

Topics

#http #network #protocols

License

BSD-3-Clause (license)

Dependencies

collection, http, meta, pool

More

Packages that depend on http2