http2 3.2.0
http2: ^3.2.0 copied to clipboard
A HTTP/2 implementation in Dart.
3.2.0 #
- Add
Settings.connectionWindowSizeandSettings.maxFrameSizeto configure the connection-level receive window andSETTINGS_MAX_FRAME_SIZE. (#1997) - Apply a larger
streamWindowSizeandmaxFrameSizeto 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_SIZEwhen sending; the ACK of our ownSETTINGS_INITIAL_WINDOW_SIZEno 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
DATAframes is terminated, reset, or its incoming subscription is cancelled. - Ignore
PRIORITYand unknown extension frames on open, idle, and closed streams, and treatSETTINGS,PING, andGOAWAYframes with a non-zero stream ID as a connection-levelPROTOCOL_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
StreamTransportExceptionwhen the peer sendsRST_STREAM(NO_ERROR)afterEND_STREAM(RFC 9113 Section 8.1). - Never write a
RST_STREAMbefore the still-queuedHEADERSof the same stream when a stream is cancelled; drop the stream's queuedDATAinstead. Http2Clientpropagates 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, andGOAWAYbehindDATAthat is waiting for connection-level flow-control credit. StreamException(a stream reset because of aGOAWAYor oversized headers) now extendsStreamTransportException, as documented forTransportExceptionsubclasses.MultiProtocolHttpServer.startServingforwards an unexpected ALPN protocol toonErrorinstead of throwing inside the socket listener.- Bound peer-initiated concurrent streams and reject peers that ignore the
advertised
SETTINGS_MAX_CONCURRENT_STREAMSvalue. 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_STREAMSlimit on incoming remote streams. - Add
Http2Client(package:http2/client.dart), a pooled, multiplexedpackage:httpClientbacked by HTTP/2 connections. - Add
ClientTransportConnection.peerMaxConcurrentStreams, exposing the peer's most recently advertisedSETTINGS_MAX_CONCURRENT_STREAMS. Note this is a new member on an implementable class, so any existingimplements ClientTransportConnectionwill 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/httpmonorepo.
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_UPDATEframes for the connection to account for data being sent on closed streams until theRST_STREAMhas 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.onInitialPeerSettingsReceivedwhich fires when initial SETTINGS frame is received from the peer.
1.0.0 #
- Graduate package to 1.0.
package:http2/http2.dartnow reexportspackage: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.isOpento returnfalseif we have exhausted the number of max-concurrent-streams.
0.1.8+1 #
- Switch all uppercase constants from
dart:convertto 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
Functionsyntax, since it isn't fully supported in Dart 1.24.
0.1.4 #
- Added an
onActiveStateChangedcallback toConnection, 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
onTerminatedhook 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.dartlibrary
0.1.0 #
- First version of a HTTP/2 transport implementation in the
package:http2/transport.dartlibrary
0.0.1 #
- Initial version