cargo hyper 0.11.0

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

Bug Fixes

  • header:
    • add length checks to ETag parsing (643fac1e)
    • prevent 2 panics in QualityItem parsing (d80aae55)
    • Allow IPv6 Addresses in Host header (8541ac72)
    • Remove raw part when getting mutable reference to typed header (f38717e4, closes #821)
    • only add chunked to TransferEncoding if not present (1b4f8579)
    • ignore invalid cookies (310d98d5)
  • http:
    • Chunked decoder reads last \r\n (bffde8c8)
    • make Chunked decoder resilient in an async world (8672ec5a)
  • server:
    • support HTTP/1.1 pipelining (523b890a)

Features

  • body:
    • implement Extend and IntoIterator for Chunk (78512bdb)
    • add Default trait to Body (f61708ba)
    • implement Default for Body (6faa653f)
    • implement Default for Chunk (f5567db4)
  • client:
    • add HttpConnector.enforce_http (1c34a05a)
    • add an accessor for the request body (4e26646a)
    • Response.status() now returns a StatusCode by value (d63b7de4)
    • add Client::handle (9101817b)
    • add Request.set_proxy for HTTP proxy requests (e8714116, closes #1056)
    • DNS worker count is configurable (138e1643)
    • add keep_alive_timeout to Client (976218ba)
  • error: Display for Error shows better info (49e196db, closes #694)
  • header:
  • http:
    • add Into for Chunk (fac3d70c)
    • use the bytes crate for Chunk and internally (65b3e08f)
    • allow specifying custom body streams (1b1311a7)
  • lib:
    • add raw_status feature in Cargo.toml (acd62cda)
    • remove extern Url type usage (4fb7e6eb)
    • export Method::Put at top level (5c890321)
    • redesign API to use Futures and Tokio (2d2d5574)
    • switch to non-blocking (asynchronous) IO (d35992d0)
  • mime: upgrade to mime v0.3 (f273224f, closes #738)
  • server:
    • make Http default its body type to hyper::Chunk (dc97dd77)
    • make Http compatible with TcpServer (e04bcc12, closes #1036)
    • add path() and query() to Request (8b3c1206, closes #896, #897)
  • status:
    • add StatusCode::try_from(u16). (f953cafe)
    • remove deprecated StatusClass (94ee6204)
    • impl Into for StatusCode (c42f18db)
  • uri:
  • version: impl FromStr for HttpVersion (47f3aa62)

Breaking Changes

  • The Cookie header is no longer a wrapper over a
    Vec<String>. It must be accessed via its get and set methods.

(dd03e723)

  • Any use of Quality(num) should change to q(num).

(a4644959)

  • HttpDate no longer has public fields. Convert between
    HttpDate and SystemTime as needed.

(316c6fad)

  • The link_extensions methods of the Link header are
    removed until fixed.

(011f28cb)

  • The fmt_header method has changed to take a different
    formatter. In most cases, if your header also implements
    fmt::Display, you can just call f.fmt_line(self).

(6f02d43a)

  • The Encoding enum has an additional variant, Trailers.

(f1859dfd)

  • Origin.scheme and Origin.host now return Options, since the Origin could be null.

(41485997)

  • If you were explicitly checking the StatusCode, such as
    with an equality comparison, you will need to use the value instead of a
    reference.

(d63b7de4)

  • This removes several deprecated methods for converting
    Headers into strings. Use more specialized methods instead.

(ec91bf41)

  • The Url type is no longer used. Any instance in the
    Client API has had it replaced with hyper::Uri.

    This also means Error::Uri has changed types to
    hyper::error::UriError.

    The type hyper::header::parsing::HTTP_VALUE has been made private,
    as an implementation detail. The function http_percent_encoding
    should be used instead.

(4fb7e6eb)

  • This makes Request.remote_addr an
    Option<SocketAddr>, instead of SocketAddr.

(e04bcc12)

  • The Preference header had a typo in a variant and it's string representation,
    change Preference::HandlingLeniant to Preference::HandlingLenient.
    (2fa414fb)
  • Server is no longer the primary entry point. Instead,
    an Http type is created and then either bind to receive a Server,
    or it can be passed to other Tokio things.
    (f45e9c8e)
  • The name of RequestUri has changed to Uri. It is no
    longer an enum, but an opaque struct with getter methods.

(9036443e)

  • This adds a new variant to the Encoding enum, which
    can break exhaustive matches.

(f0ab2b6a)

  • The fields of the Host header are no longer
    available. Use the getter methods instead.

(cd9fd522)

  • A big sweeping set of breaking changes.

(2d2d5574)

  • Headers.remove() used to return a bool,
    it now returns Option<H>. To determine if a a header exists,
    switch to Headers.has().
    (9375addb)
  • Header::parse_header now receives &Raw, instead of
    a &[Vec<u8>]. Raw provides several methods to ease using it, but
    may require some changes to existing code.
    (50ccdaa7)
  • LanguageTag used to be at the crate root, but it is now
    in the hyper::header module.

(40745c56)

  • Removes the undocumented from_u16 function. Use
    StatusCode::try_from instead.

    Also makes the status module private. All imports of
    hyper::status::StatusCode should be hyper::StatusCode.

(f953cafe)

  • All usage of status.class() should change to
    equivalent status.is_*() methods.

(94ee6204)

  • Most uses of mime will likely break. There is no more
    mime! macro, nor a Mime constructor, nor TopLevel and SubLevel
    enums.

    Instead, in most cases, a constant exists that can now be used.

    For less common mime types, they can be created by parsing a string.

(f273224f)

  • To use RawStatus, you must enable the raw_status
    crate feature.

(acd62cda)

  • Some headers used UniCase, but now use
    unicase::Ascii. Upgrade code to Ascii::new(s).

(c81edd41)

  • This breaks a lot of the Client and Server APIs.
    Check the documentation for how Handlers can be used for asynchronous
    events.

(d35992d0)

Thanks

Ahmed Charles
Aidan Hobson Sayers
Alexander Mielczarek
Alex Crichton
Alexey Zabelin
Andre Silva
Andy Moran
Anthony Ramine
Aravind Gollakota
Corey Farwell
Daiki Mizukami
Darin Minamoto
David Ross
derekdreery
Dmitry Gritsay
Ed Barnard
Eric Chiang
Florent Monjalet
Garrett Squire
Georg Brandl
golem131
Guillaume Gomez
hag
Jake Goulding
James Kay
James Munns
Joe Wilm
Jonathan Giddy
Joonas Koivunen
Josh
Julian Tescher
Julius de Bruijn
Justin Mayhew
Kei Tsuji
Kornelijus Survila
Laurent Arnoud
leonardo.yvens
liamchristopher
M3rs
Markus Unterwaditzer
Matthew Dawson
mayah
Michael
Michael Killough
Michael Zapata
Mikhail Pak
Nick Gonzales
Pyfisch
Raghav
Ran Benita
Richard Dodd
Robin Stocker
Sander Maijers
Sean McArthur
Shane Gibbs
Simon Smith
sinkuu
softprops
taku0
Tasos Bakogiannis
Tom Burdick
Tshepang Lekhonkhobe
Utkarsh Kukreti
Vincent Prouillet
wangcong
Yazad Daruvala
YetAnotherMinion
Yves Dorfsman

Don't miss a new hyper release

NewReleases is sending notifications on new releases.