Skip to content

v0.13.0

Compare
Choose a tag to compare
@seanmonstar seanmonstar released this 10 Dec 17:55
· 655 commits to master since this release

Bug Fixes

  • client:
    • fix polling dispatch channel after it has closed (039281b8)
    • fix panic from unreachable code (e6027bc0)
  • dependencies: require correct bytes minimum version (#1975) (536b1e18)
  • server:
    • change Builder window size methods to be by-value (a22dabd0, closes #1814)
    • ignore expect-continue with no body in debug mode (ca5836f1, closes #1843)
    • Remove unneeded 'static bound of Service on Connection (#1971) (4d147126)

Features

  • body:
    • change Sender::send_data to an async fn. (62a96c07)
    • require Sync when wrapping a dynamic Stream (44413721)
    • add body::aggregate and body::to_bytes functions (8ba9a8d2)
    • replace Chunk type with Bytes (5a598757, closes #1931)
    • replace the Payload trait with HttpBody (c63728eb)
  • client:
    • impl tower_service::Service for Client (edbd10ac)
    • provide tower::Service support for clients (#1915) (eee2a728)
    • change connectors to return an impl Connection (4d7a2266)
    • remove Destination for http::Uri in connectors (319e8aee)
    • filter remote IP addresses by family of given local IP address (131962c8)
    • change Resolve to be Service<Name> (9d9233ce, closes #1903)
    • change Connect trait into an alias for Service (d67e49f1, closes #1902)
    • change GaiResolver to use a global blocking threadpool (049b5132)
    • Add connect timeout to HttpConnector (#1972) (4179297a)
  • lib:
    • update to std::future::Future (8f4b05ae)
    • add optional tcp feature, split from runtime (5b348b82)
    • make Stream trait usage optional behind the stream feature, enabled by default (0b03b730, closes #2034)
    • update Tokio, bytes, http, h2, and http-body (cb3f39c2)
  • rt: introduce rt::Executor trait (6ae5889f, closes #1944)
  • server:
    • introduce Accept trait (b3e55062)
    • give Server::local_addr a more general type (3cc93e79)
    • change http1_half_close option default to disabled (7e31fd88)
  • service:
    • use tower_service::Service for hyper::service (ec520d56)
    • rename Service to HttpService, re-export tower::Service (4f274399, closes #1959)

Breaking Changes

  • All usage of async traits (Future, Stream,
    AsyncRead, AsyncWrite, etc) are updated to newer versions.

(8f4b05ae)

  • All usage of hyper::Chunk should be replaced with
    bytes::Bytes (or hyper::body::Bytes).

(5a598757)

  • Using a Body as a Stream, and constructing one via
    Body::wrap_stream, require enabling the stream feature.

(511ea388)

  • Calls to GaiResolver::new and HttpConnector::new no
    longer should pass an integer argument for the number of threads.

(049b5132)

  • Connectors no longer return a tuple of
    (T, Connected), but a single T: Connection.

(4d7a2266)

  • All usage of hyper::client::connect::Destination
    should be replaced with http::Uri.

(319e8aee)

  • All usage of hyper::body::Payload should be replaced
    with hyper::body::HttpBody.

(c63728eb)

  • Any type passed to the executor builder methods must
    now implement hyper::rt::Executor.

    hyper::rt::spawn usage should be replaced with tokio::task::spawn.

    hyper::rt::run usage should be replaced with #[tokio::main] or
    managing a tokio::runtime::Runtime manually.

(6ae5889f)

  • The Resolve trait is gone. All custom resolvers should
    implement tower::Service instead.

    The error type of HttpConnector has been changed away from
    std::io::Error.

(9d9233ce)

  • Any manual implementations of Connect must instead
    implement tower::Service<Uri>.

(d67e49f1)

  • The server's behavior will now by default close
    connections when receiving a read EOF. To allow for clients to close
    the read half, call http1_half_close(true) when configuring a
    server.

(7e31fd88)

  • Passing a Stream to Server::builder or
    Http::serve_incoming must be changed to pass an Accept instead. The
    stream optional feature can be enabled, and then a stream can be
    converted using hyper::server::accept::from_stream.

(b3e55062)

  • Usage of send_data should either be changed to
    async/await or use try_send_data.

(62a96c07)