cargo hyper 0.14.0

latest releases: 0.14.17, 0.14.16, 0.14.15...
3 years ago

Blog post: https://seanmonstar.com/post/638320652536922112/hyper-v014

Bug Fixes

Features

  • client:
  • http1: Make HTTP/1 support an optional feature (2a19ab74)
  • http2: Make HTTP/2 support an optional feature (b819b428)
  • lib:
  • server: Make the server code an optional feature (#2334) (bdb5e5d6)
  • upgrade: Moved HTTP upgrades off Body to a new API (#2337) (121c3313, closes #2086)

Breaking Changes

  • hyper depends on tokio v1 and bytes v1.

  • Custom resolvers used with HttpConnector must change
    to resolving to an iterator of SocketAddrs instead of IpAddrs.
    (b4e24332)

  • hyper no longer emits log records automatically.
    If you need hyper to integrate with a log logger (as opposed to tracing),
    you can add tracing = { version = "0.1", features = ["log"] } to activate them.
    (db32e105)

  • Removed http1_writev methods from client::Builder,
    client::conn::Builder, server::Builder, and server::conn::Builder.

    Vectored writes are now enabled based on whether the AsyncWrite
    implementation in use supports them, rather than though adaptive
    detection. To explicitly disable vectored writes, users may wrap the IO
    in a newtype that implements AsyncRead and AsyncWrite and returns
    false from its AsyncWrite::is_write_vectored method.
    (d6aadb83)

  • The method Body::on_upgrade() is gone. It is
    essentially replaced with hyper::upgrade::on(msg).
    (121c3313)

  • All optional features have been disabled by default.
    (ed2b22a7)

  • The HTTP server code is now an optional feature. To
    enable the server, add features = ["server"] to the dependency in
    your Cargo.toml.
    (bdb5e5d6)

  • The HTTP client of hyper is now an optional feature. To
    enable the client, add features = ["client"] to the dependency in
    your Cargo.toml.
    (4e55583d)

  • This puts all HTTP/1 methods and support behind an
    http1 cargo feature, which will not be enabled by default. To use
    HTTP/1, add features = ["http1"] to the hyper dependency in your
    Cargo.toml.

(2a19ab74)

  • This puts all HTTP/2 methods and support behind an
    http2 cargo feature, which will not be enabled by default. To use
    HTTP/2, add features = ["http2"] to the hyper dependency in your
    Cargo.toml.

(b819b428)

Don't miss a new hyper release

NewReleases is sending notifications on new releases.