- client:
- conn: handle when pre-emptive flushing closes the write state (8f938d97, closes #1391)
- lib: fix
no_protodispatcher to flush queue before polling more body (121b5eef) - server: allow TLS shutdown before dropping connections with
no_proto(60d0eaf8, closes #1380)
- headers: Implement
ProxyAuthorization(#1394) (c93cdb29) - server:
- client:
- header: implement
ByteRangeSpec::to_satisfiable_range(bb54e36c) - lib: add support to disable tokio-proto internals (f7532b71)
- server:
- server: fix experimental pipeline flushing (6b4635fd)
- http: avoid infinite recursion when Body::from is called with Cow::Owned. (#1343) (e8d61737)
- header: add ContentType::xml() constructor (92595e84)
- http: add Body::from(cow) for bytes and strings (425ff71d)
- lib: implement compatibility with http crate (0c7d375b)
- server:
- server: try to read from socket at keep-alive (1a9f2648)
- client: don't assume bodies on 204 and 304 Responses (81c0d185, closes #1242)
- header: fix panic from headers.remove when typed doesn't match (4bd9746a)
- http:
- server:
- uri: fix Uri parsing of IPv6 and userinfo (7081c449, closes #1269)
- headers: export missing header types (c9f4ff33)
- server: Provide reference to Response body (a79fc98e, closes #1216)
- status: add
as_u16()method toStatusCode(5f6f252c)
- server: Handle 100-continue (6164e764)
- 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)
- 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)
- The
Cookieheader is no longer a wrapper over aVec<String>. It must be accessed via itsgetandsetmethods.
(dd03e723)
- Any use of
Quality(num)should change toq(num).
(a4644959)
HttpDateno longer has public fields. Convert betweenHttpDateandSystemTimeas 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 implementsfmt::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 theClientAPI has had it replaced withhyper::Uri.This also means
Error::Urihas changed types tohyper::error::UriError.The type
hyper::header::parsing::HTTP_VALUEhas been made private, as an implementation detail. The functionhttp_percent_encodingshould be used instead.
(4fb7e6eb)
- This makes
Request.remote_addranOption<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 the
hyper::headermodule.
(40745c56)
-
Removes the undocumented
from_u16function. UseStatusCode::try_frominstead.Also makes the
statusmodule private. All imports ofhyper::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 moremime!macro, nor aMimeconstructor, norTopLevelandSubLevelenums.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_statuscrate feature.
(acd62cda)
- Some headers used
UniCase, but now useunicase::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)
- server: add local_addr to retrieve resolved address (71f250ad)
- server: don't dup the listener TCP socket. (d2362331)
- buffer: add from_parts and into_parts functions (78551dd0)
- http:
- header: implement fmt::Display for several headers (d5075770)
- header:
- header: add Headers::append_raw (6babbc40)
- header: security fix for header values that include newlines (2603d78f)
- net: set timeouts directly in
accept(f5d4d653)
-
This technically will cause code that a calls
SetCookie.fmt_headerto panic, as it is no longer to properly write that method. Most people should not be doing this at all, and all other ways of printing headers should work just fine.The breaking change must occur in a patch version because of the security nature of the fix.
(2603d78f)
- client:
- header: remove
cookiedependency (f22701f7) - lib:
-
There is no more
hyper::http::h2.(d301c6a1)
-
The
CookieandSetCookieheaders no longer use the cookie crate. New headers can be written for any header, or the ones provided in hyper can be accessed as strings.(f22701f7)
-
There is no longer a
serde-serializationfeature. Look at external crates, likehyper-serde, to fulfill this feature.(7b9817ed)
-
hyper will no longer provide OpenSSL support out of the box. The
hyper::net::Openssland related types are gone. TheClientnow uses anHttpConnectorby default, which will error trying to access HTTPS URLs.TLS support should be added in from other crates, such as hyper-openssl, or similar using different TLS implementations.
(2f48612c)
-
Usage of
with_proxy_configwill need to change to provide a network connector. For the same functionality, ahyper::net::HttpConnectorcan be easily created and passed.(14a4f1c2)
- headers: add star, json, text, image constructors to Accept (a9fbbd7f)
- server: add 'take_buf' method to BufReader (bbbce5fc)
- client: close Pooled streams on sockopt error (d5ffee2e)
- error: re-export url::ParseError (30e78ac2)
- headers: Allow IPv6 Addresses in Host header (20f177ab)
- headers:
- server: accept combined certificate files (eeb1f48e)
- proxy: fix the 0.9.x build with
--no-default-features --features=security-framework(6caffe9f, closes #819) - server: Request.ssl() works (ce0b62ea)
- client: Manually impl Debug for PooledStream (aa692236)
- server: Switch Ssl to SslServer in bounds (470bc8ec)
- net: Add OpensslClient constructor (3c0e1050)
- warnings: remove unused_code warnings from newest nightlies (e7229480)
- ssl:
- client:
- client: don't keep Pool mutex locked during getaddrinfo (5fcc04a6)
- Cargo.toml: update documentation link (b783ddf4)
- net: Add Ssl impls for security-framework (f37315b2)
- The re-exported Url type has breaking changes. (8fa7a989)
- header: add prefer and preference applied headers (6f649301, closes #747)
- net: Split Ssl into SslClient and SslServer (2c86e807, closes #756)
- headers: remove charset from
ContentType::json()convenience method (ec568e9a) - net: fix the typo in
set_write_timeout(7c76fff3)
- mime 0.2 depends on serde 0.7, so any instances of using older versions of serde will need to upgrade.
(146df53c)
- headers: allow ExtendedValue structs to be formatted and used as struct members (da0abe89)
- cargo: remove * dependencies for serde and env_logger (4a05bee9)
- server:
- headers: add extended parameter parser to the public API (402fb76b)
- all: add socket timeouts (fec6e3e8)
- headers:
- This adds 2 required methods to the
NetworkStreamtrait,set_read_timeoutandset_write_timeout. Any local implementations will need to add them.
(fec6e3e8)
- LanguageTags api is changed.
(c747f99d)
- response: respond with a 500 if a handler panics (63c6762c)
- headers: Add Access-Control-Expose-Headers (f783e991)
- server: Add hooks for HttpListener and HttpsListener to be started from existing listener (fa0848d4)
RequestBuilder<U>should be replaced byRequestBuilder.
(ff4a6070)
- client: add patch method to Client builder interface (03827c31)
- http:
- server: use EmptyWriter for status codes that have no body (9b2998bd)
- timeouts: remove rust #![feature] for socket timeouts (b8729698)
- headers: add PartialEq impl for Headers struct (76cbf384)
- client: EofReader by nature means the connection is closed (32e09a04)
- client: be resilient to invalid response bodies (75c71170, closes #640)
- examples: "cargo test --features serde-serialization" (63608c49)
- http: fix several cases in HttpReader (5c7195ab)
- server: Add Handler per-connection hooks (6b6182e8)
- client: fix panics when some errors occurred inside HttpMessage (ef15257b)
- headers: case insensitive values for Connection header (341f8eae, closes #635)
-
This changes the signature of HttpWriter.end(), returning a
EndErrorthat is similar to std::io::IntoInnerError, allowing HttpMessage to retrieve the broken connections and not panic.The breaking change isn't exposed in any usage of the
ClientAPI, but for anyone usingHttpWriterdirectly, since this was technically a public method, that change is breaking.
(ef15257b)
- client: close connection when there is an Error (d32d35bb)
- client:
- nightly: remove feature flag for duration (0455663a)
- headers: Content-Range header (af062ac9)
- net: impl downcast methods for NetworkStream (without + Send) (1a91835a, closes #521)
- server: add Request.ssl() to get underlying ssl stream (7909829f, closes #627)
- raw-fd: implement FromRawFd/FromRawSocket (664bde58)
- headers: fix broken deserialization of headers (f5f5e1cb)
- net:
- Any custom implementation of NetworkStream must now
implement
set_read_timeoutandset_write_timeout, so those will break. Most users who only use the provided streams should work with no changes needed.
Closes #315
(7d1f154c)
- tests: iter.connect() is now iter.join() (d2e8b5dc)
- http: add optional serialization of common types via
serde(87de1b77)
- client: add url property Response (82ed9092)
- headers: add strict-transport-security header (7c2e5124, closes #589)
- Access-Control-Allow-Origin does no longer use Url
(ed458628)
- Technically a break, since
Response::new()takes an additional argument. In practice, the only place that should have been creating Responses directly is inside the Client, so it shouldn't break anyone. If you were creating Responses manually, you'll need to pass a Url argument.
(82ed9092)
- benches: adjust to missing
set_ssl_verifier(eb38a11b) - cargo: fix linking on OSX 10.10 (9af2b66f)
- client: use Ssl instance in creation of SslStream (1a490e25)
- client: check for drained stream in Response::drop (e689f203)
- client:
- error: add private
__Nonexhaustivevariant to Error (7c0421e3) - headers:
- http2:
- langtags: use true language tags in headers (99ff7e62)
- ssl: redesign SSL usage (53bba6eb)
- AcceptLanguage and ContentLanguage use LanguageTag now, Language removed from Hyper.
(99ff7e62)
- Server::https was changed to allow any implementation of Ssl. Server in general was also changed. HttpConnector no longer uses SSL; using HttpsConnector instead.
(53bba6eb)
- Connectors and Protocols passed to the
Clientmust now also have aSyncbounds, but this shouldn't break default usage.
(64e47b4b)
- parse_header returns Result instead of Option, related code did also change
(195a89fa)
- Adds a new variant to public Error enum. The proper fix
is to stop matching exhaustively on
hyper::Error.
(7c0421e3)
- A new variant
Http2added to a public enumhyper::Error.
(48e9ca2f)
hyper::client::request::Responseis no longer generic overNetworkStreamtypes. It no longer requires a generic type parameter at all.
(aa297f45)
- buffer: check capacity before resizing (b1686d1b)
- client: implement Default trait for client (be041d91)
- header: add ContentType::form_url_encoded() constructor (2c99d4e9)
- headers: return hyper::Error instead of () from header components (5d669399)
- http: add get_mut method to HttpReader (e64ce8c0)
- Error enum extended. Return type of header/shared/ types changed.
(5d669399)
- client:
- mock: adjust ChannelMockConnector connect method to compile (085d7b07)
- header:
- net:
- server: check Response headers for Connection: close in keep_alive loop (49b5b8fd)
- Usage of Response.deconstruct() and construct() now use a &mut Headers, instead of the struct proper.
(49b5b8fd)
- If you use deref! from the header module, you'll need to switch to using __hyper__deref!.
(62d96adc)
-
Any custom Connectors will need to change to &self in the connect method. Any Connectors that needed the mutability need to figure out a synchronization strategy.
Request::with_connector() takes a &NetworkConnector instead of &mut. Any uses of with_connector will need to change to passing &C.
(1b318724)
- Adding a new required method to a public trait is a breaking change.
(a5d632b6)
- error: add Ssl variant to hyper::Error (972b3a38, closes #483)
- headers:
- method: implement
AsRef<str>forMethod(c29af729) - server:
- Adds a variant to
hyper::Error, which may break any exhaustive matches.
(972b3a38)
- The terms
HttpandErrorhave been removed from the Error type and its variants.HttpErrorshould now be accessed ashyper::Error, and variants likeHttpIoErrorshould be accessed asError::Io.
(9ba074d1)
- Add variant to Access-Control-Allow-Origin enum
(5e341714)
- Upgrade header Protocol changed.
(f47d11b9)
from_one_raw_str()returnsNoneon empty values.
(a6974c99)
- client: add a Connection Pool (1e72a8ab, closes #363, #41)
- headers: Add If-Range header (a39735f1, closes #388)
- headers:
- client:
- headers: Implement Content-Language header field (308880b4, closes #475)
- net: add https_using_context for user-supplied SslContext (1a076d1b)
- server: allow consumer to supply an SslContext (3a1a2427, closes #471)
- This removes the trait
IntoBody, and instead usingInto<Body>, as it's more idiomatic. This will only have broken code that had custom implementations ofIntoBody, and can be fixed by changing them toInto<Body>.
(a2aefd9a)
- http: Adjust httparse Request and Response lifetimes. (76550fdb)
- server: JoinHandle type parameter (c694b138)
- debug: add Debug impls for StatusClass, Server, and Listening (0fb92ee7)
- server:
- http: Implement Debug for HttpReader/Writer. (2f606c88)
- log: clean up logging (4f09b002)
- net: make HttpStream implement Debug (7b7f9c25)
- headers: Content-Encoding needs a hyphen. (ca2815ef)
AccessControlAllowHeadersandAccessControlRequestHeadersvalues are case insensitive now.AccessControlAllowOriginvariants are nowAnyandValueto match the other headers.
(94f38950)
If-Match,If-None-MatchandVaryitem variant name changed toItems
(38d297b1)
Etagheader field is nowETagheader field
(4434ea6a)
-
For people using the default HttpConnector and Client, everything should continue to just work. If the Client has been used with a generic parameter, it should be removed.
However, there were some breaking changes to the internals of NetworkConnectors. Specifically, they no longer return a NetworkStream, but instead a Into<Box<NetworkStream + Send>>. All implementations of NetworkStream should continue to just work, however.
Possible breakages could come from the stricter usage of Send throughout the Client API.
(139a51f1)
- README: Update to compile example against Rust beta (341f19d3)
- headers: Add CowStr as a temporary hack to build on beta. (8e065563)
- rustup: update to rust beta (0f5858f3)
- Removed impl_header!() and impl_list_header!() macros, use new header!() macro.
(262c450f)
- buffer: zero out new capacity when buffer grows (cfdabd70)
- entitytag: Add EntityTag comparison, make EntityTag safe to use (9c21f7f9)
- buffer: get_buf to not return consumed part of buffer (04e3b565, closes #406)
- rustup: get rid of slice pattern, add
Reflectbounds (c9f2c841)
- rustup: static bounds required on Type definition, trivial_casts (eee7a85d)
- rustup:
- benches: removed unused features (104d4903)
- rustup:
- server: use SocketAddrs instead of Ipv4Addrs (5d7be77e)
- header: Fix charset parsing bug. (5a6e176f)
- headers: Fix overflow with empty cookies (99baaa10)
- rustup: update to latest rustc (4fd8a6a9)
- Several public functions and types in the
httpmodule have been removed. They have been replaced with 2 methods that handle all of the http1 parsing.
(b87bb20f)
- added requirement that all HeaderFormat implementations must also be fmt::Debug. This likely as easy as slapping #[derive(Debug)] on to any custom headers.
(df756871)
- Check the docs. Everything was touched.
(0fd6fcd7)
- rustup: str.split and associated type changes (1b6e6a04)
- headers: use $crate when referring to hyper modules on macros (e246c3ac, closes #323)
- rustup:
- Send changes (4f5b97fe)
- CowString is gone (98b8c4b1)
- Extend now takes an IntoIterator (598d8f93)
- Add PhantomData markers to phantom type users (1904c456)
- Remove uses of the obsolete &a[] syntax (039e984f)
- Fix signature of IntoCow (234fcdc3)
- update feature flags (b47f9365)
- use module-level thread functions (fc2076cd)
- update lifetime bounds (f4a66b38)
- server: make AcceptorPool::accept() block and allow non'-static data (b0a72d80)
- header: Support arbitrary status codes (73978531)
- headers:
- server: Rewrite the accept loop into a custom thread pool. (3528fb9b)
- This removes unregistered status codes from the enum. Use
FromPrimitivemethods to create them now. StatusCode and StatusClass can no longer be casted tou16, useToPrimitivemethods now. For examplestatus.to_u16().unwrap()to get the status code number.
(73978531)
- net: don't stop the server when an SSL handshake fails with EOF (55f12660)
- readme: Make the README client example work (9b5d6aab)
- headers: add IfUnmodifiedSince header (b5543b67)
- for any consumers of the Etag header, since the entity tag is now in a tuple.
(28fd5c81)
- headers: Don't display q if q=1 in quality item. (91df2441, closes #281)
- rustup: update io import, Writer::write (f606b603)
- status: add is_<status_class>() methods to StatusCodes (2d55a22e)
- headers:
- log: update to new logging levels (b002b6c3)
- Change header
CookietoCookie
(92f43cf8)
- rustup: update to newest fmt trait names and slice syntax (9e3c94d7)
- Implementations of Header will need to adjust the header_name method. It no longer takes any arguments.
(8215889e)
- headers: make Schemes, Basic, Protocol public (e43c35c1)
- imports: Update TypeID import location to "any" (dd2534a6)
- server: add a deconstruct method to Request. (1014855f)
- server: Increase MAX_HEADER_FIELD_LENGTH to 4k (54238b28)
- net: