v0.11.0
Bug Fixes
- header:
- add length checks to
ETagparsing (643fac1e) - prevent 2 panics in
QualityItemparsing (d80aae55) - Allow IPv6 Addresses in
Hostheader (8541ac72) - Remove raw part when getting mutable reference to typed header (f38717e4, closes #821)
- only add chunked to
TransferEncodingif not present (1b4f8579) - ignore invalid cookies (310d98d5)
- add length checks to
- http:
- server:
- support HTTP/1.1 pipelining (523b890a)
Features
- body:
- client:
- add
HttpConnector.enforce_http(1c34a05a) - add an accessor for the request body (4e26646a)
- Response.status() now returns a
StatusCodeby 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)
- add
- error: Display for Error shows better info (49e196db, closes #694)
- header:
- add ContentType::octet_stream() constructor (1a353102)
- change
Cookieto be map-like (dd03e723, closes #1145) - add
Cookie::iter()(edc1c0dd) - implement fmt::Display for several headers (e9e7381e)
- add
Headers::append_raw(b4b2fb78) - Add support for Retry-After header (1037bc77)
- add
Encoding::Brotlivariant (f0ab2b6a) - introduce
header::Raw(#869) (50ccdaa7) - add
TEheader struct (#1150) (f1859dfd, closes #1109) - support Opaque origin headers (#1147) (41485997, closes #1065)
- add
HeaderView.raw()(8143c33b) impl Eq for ContentType(bba761ac)- add
Linkheader implementation (592c1e21, closes #650) - add
star,json,text,imageconstructors toAccept(bdc19d52) - Add strict-origin and strict-origin-when-cross-origin referer policy (3593d798)
- support multiple values for Referrer-Policy header (7b558ae8, closes #882)
- add
Warningheader (69894d19, closes #883) Headers::removereturns the Header (9375addb, closes #891)- add
ContentLocationheader (13c5bf66, closes #870) - add
LastEventIdheader (e1542a60) - add `Origin header (01843f88, closes #651)
- Add
ReferrerPolicyheader (3a86b3a2)
- http:
- lib:
- mime: upgrade to mime v0.3 (f273224f, closes #738)
- server:
- status:
- uri:
- version: impl
FromStrforHttpVersion(47f3aa62)
Breaking Changes
- The
Cookieheader is no longer a wrapper over a
Vec<String>. It must be accessed via itsgetandsetmethods.
(dd03e723)
- Any use of
Quality(num)should change toq(num).
(a4644959)
HttpDateno longer has public fields. Convert between
HttpDateandSystemTimeas needed.
(316c6fad)
- The
link_extensionsmethods of theLinkheader are
removed until fixed.
(011f28cb)
- The
fmt_headermethod has changed to take a different
formatter. In most cases, if your header also implements
fmt::Display, you can just callf.fmt_line(self).
(6f02d43a)
- The
Encodingenum has an additional variant,Trailers.
(f1859dfd)
Origin.schemeandOrigin.hostnow returnOptions, since theOrigincould benull.
(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
Urltype is no longer used. Any instance in the
ClientAPI has had it replaced withhyper::Uri.This also means
Error::Urihas changed types to
hyper::error::UriError.The type
hyper::header::parsing::HTTP_VALUEhas been made private,
as an implementation detail. The functionhttp_percent_encoding
should be used instead.
(4fb7e6eb)
- This makes
Request.remote_addran
Option<SocketAddr>, instead ofSocketAddr.
(e04bcc12)
- The
Preferenceheader had a typo in a variant and it's string representation,
changePreference::HandlingLenianttoPreference::HandlingLenient.
(2fa414fb) Serveris no longer the primary entry point. Instead,
anHttptype is created and then eitherbindto receive aServer,
or it can be passed to other Tokio things.
(f45e9c8e)- The name of
RequestUrihas changed toUri. It is no
longer anenum, but an opaque struct with getter methods.
(9036443e)
- This adds a new variant to the
Encodingenum, which
can break exhaustive matches.
(f0ab2b6a)
- The fields of the
Hostheader are no longer
available. Use the getter methods instead.
(cd9fd522)
- A big sweeping set of breaking changes.
(2d2d5574)
Headers.remove()used to return abool,
it now returnsOption<H>. To determine if a a header exists,
switch toHeaders.has().
(9375addb)Header::parse_headernow receives&Raw, instead of
a&[Vec<u8>].Rawprovides 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 thehyper::headermodule.
(40745c56)
-
Removes the undocumented
from_u16function. Use
StatusCode::try_frominstead.Also makes the
statusmodule private. All imports of
hyper::status::StatusCodeshould behyper::StatusCode.
(f953cafe)
- All usage of
status.class()should change to
equivalentstatus.is_*()methods.
(94ee6204)
-
Most uses of
mimewill likely break. There is no more
mime!macro, nor aMimeconstructor, norTopLevelandSubLevel
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 theraw_status
crate feature.
(acd62cda)
- Some headers used
UniCase, but now use
unicase::Ascii. Upgrade code toAscii::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