- body: return exactly 0 SizeHint for empty body (#2122) (dc882047)
- client: strip path from Uri before calling Connector (#2109) (ba2a144f)
- http1:
- http2: don't add client content-length if method doesn't require it (fb90d30c)
- service: Implement Clone/Copy on ServiceFn and MakeServiceFn (#2104) (a5720fab)
- http1: fix response with non-chunked transfer-encoding to be close-delimited (cb71d2cd, closes #2058)
- body: implement
HttpBody
forRequest
andResponse
(4b6099c7, closes #2067) - client: expose
hyper::client::connect::Connect
trait alias (2553ea1a)
- client:
- dependencies: require correct bytes minimum version (#1975) (536b1e18)
- server:
- body:
- 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
forhttp::Uri
in connectors (319e8aee) - filter remote IP addresses by family of given local IP address (131962c8)
- change
Resolve
to beService<Name>
(9d9233ce, closes #1903) - change
Connect
trait into an alias forService
(d67e49f1, closes #1902) - change
GaiResolver
to use a global blocking threadpool (049b5132) - Add connect timeout to HttpConnector (#1972) (4179297a)
- lib:
- rt: introduce
rt::Executor
trait (6ae5889f, closes #1944) - server:
- service:
- All usage of async traits (
Future
,Stream
,AsyncRead
,AsyncWrite
, etc) are updated to newer versions.
(8f4b05ae)
- All usage of
hyper::Chunk
should be replaced withbytes::Bytes
(orhyper::body::Bytes
).
(5a598757)
- Using a
Body
as aStream
, and constructing one viaBody::wrap_stream
, require enabling thestream
feature.
(511ea388)
- Calls to
GaiResolver::new
andHttpConnector::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 singleT: Connection
.
(4d7a2266)
- All usage of
hyper::client::connect::Destination
should be replaced withhttp::Uri
.
(319e8aee)
- All usage of
hyper::body::Payload
should be replaced withhyper::body::HttpBody
.
(c63728eb)
-
Any type passed to the
executor
builder methods must now implementhyper::rt::Executor
.hyper::rt::spawn
usage should be replaced withtokio::task::spawn
.hyper::rt::run
usage should be replaced with#[tokio::main]
or managing atokio::runtime::Runtime
manually.
(6ae5889f)
-
The
Resolve
trait is gone. All custom resolvers should implementtower::Service
instead.The error type of
HttpConnector
has been changed away fromstd::io::Error
.
(9d9233ce)
- Any manual implementations of
Connect
must instead implementtower::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
toServer::builder
orHttp::serve_incoming
must be changed to pass anAccept
instead. Thestream
optional feature can be enabled, and then a stream can be converted usinghyper::server::accept::from_stream
.
(b3e55062)
- Usage of
send_data
should either be changed to async/await or usetry_send_data
.
(62a96c07)
- body: identify aborted body write errors (32869224)
- client:
HttpConnector
: allow to set socket buffer sizes (386109c4)
- http1: force always-ready connections to yield after a few spins (8316f96d)
- http2: correctly propagate HTTP2 request cancellation (50198851)
- body: implement
http_body::Body
forhyper::Body
(2d9f3490) - client: Implement
TryFrom
forDestination
(#1810) (d1183a80, closes #1808) - server: add initial window builder methods that take self by-val (#1817) (8b45af7f)
- client:
- http2: fix import of h2::Reason to work on 1.26 (5680d944)
- http2: send a GOAWAY when the user's Service::poll_ready errors (42c5efc0)
- server: prohibit the length headers on successful CONNECT (d1501a0f, closes #1783)
- http2: check
Error::source()
for an HTTP2 error code to send in reset (fc18b680)
- client: coerce HTTP_2 requests to HTTP_11 (3a6080b1, closes #1770)
- http2: send INTERNAL_ERROR when user's Service errors (8f926a0d)
- error: implement
Error::source
when available (4cf22dfa, closes #1768) - http2: Add window size config options for Client and Server (7dcd4618, closes #1771)
- server: add
http2_max_concurrent_streams
builder option (cbae4294, closes #1772) - service:
- client: fix panic when CONNECT request doesn't have a port (d16b2c30)
- server:
- http2: revert http2 refactor causing a client hang (9aa7e990)
- client: parse IPv6 hosts correctly in HttpConnector (c328c62e)
- client:
- dependencies: disable unneeded optional tokio features (e5135dd6, closes #1739)
- http2: don't consider an h2 send request error as canceled (cf034e99)
- rt: prevent fallback reactor thread from being created accidentally (1d253b4d)
- server: add
server::conn::AddrIncoming::bind
constructor (2d5eabde)
- error: add
Error::is_connect
method (01f64983) - server:
- service: export
hyper::service::MakeServiceRef
(a522c315)
- http1: implement an adaptive read buffer strategy which helps with throughput and memory management (fd25129d, closes #1708)
- client: add
http1_read_buf_exact_size
Builder option (2e7250b6)
- client: add client::conn::Builder::executor method (95446cc3)
- server: change
NewService
toMakeService
with connection context (30870029, closes #1650)
- header: fix panic when parsing header names larger than 64kb (9245e940)
- client: add ALPN h2 support for client connectors (976a77a6)
- armv7: split record_header_indices loop to work around rustc/LLVM bug (30a4f237)
- http2: add Date header if not present for HTTP2 server responses (37ec724f)
- server: log and ignore connection errors on newly accepted sockets (66a857d8)
- client: allow calling
Destination::set_host
with IPv6 addresses (af5e4f3e, closes #1661) - server: use provided executor if fallback to HTTP2 (1370a6f8)
- http1: fix title-case option when header names have symbols (ca5e520e)
- http2: allow TE "trailers" request headers (24f11a42, closes #1642)
- server: properly handle keep-alive for HTTP/1.0 (1448e406, closes #1614)
- client: add
max_idle_per_host
configuration option (a3c44ded) - server: add
Server::with_graceful_shutdown
method (168c7d21, closes #1575)
- server: coerce responses with HTTP2 version to HTTP/1.1 when protocol is 1.x (195fbb2a)
- server:
- http1: reduce closed connections when body is dropped (6530a00a)
- client:
- server: add
Builder::http1_pipeline_flush
configuration (5b5e3090)
- client:
- client: enable CONNECT requests through the
Client
(2a3844ac) - http2: quickly cancel when receiving RST_STREAM (ffdb4788)
- body:
- client: add
set_scheme
,set_host
, andset_port
forDestination
(27db8b00, closes #1564) - error: add
Error::cause2
andError::into_cause
(bc5e22f5, closes #1542) - http1: Add higher-level HTTP upgrade support to Client and Server (#1563) (fea29b29, closes #1395)
- http2:
- server: add upgrading process to
poll_without_shutdown()
(#1530) (c6e90b7b)
- client: implement
Clone
forDestination
(15188b7c) - server:
- lib:
- body:
- client:
- rename
FutureResponse
toResponseFuture
(04c74ef5) - support local bind for
HttpConnector
(b6a3c85d, closes #1498) - add support for title case header names (#1497) (a02fec8c, closes #1492)
- add support to set
SO_NODELAY
on client HTTP sockets (016d79ed, closes #1473) - improve construction of
Client
s (fe1578ac) - redesign the
Connect
trait (8c52c2df, closes #1428)
- rename
- error: revamp
hyper::Error
type (5d3c4722, closes #1128, #1130, #1431, #1338) - rt: make tokio runtime optional (d127201e)
- server:
- service: introduce hyper-specific
Service
(2dc6202f, closes #1461)
- lib: remove deprecated tokio-proto APIs (a37e6b59)
- server: panic on max_buf_size too small (aac250f2)
-
Body::is_empty()
is gone. Replace withBody::is_end_stream()
, from thePayload
trait.(19f90242)
-
Each payload chunk must implement
Buf
, instead of justAsRef<[u8]>
.(a3be110a)
-
Replace any references of
hyper::client::FutureResponse
tohyper::client::ResponseFuture
.(04c74ef5)
-
The
Service
trait has changed: it has some changed associated types, andcall
is now bound to&mut self
.The
NewService
trait has changed: it has some changed associated types, andnew_service
now returns aFuture
.Client
no longer implementsService
for now.hyper::server::conn::Serve
now returnsConnecting
instead ofConnection
s, sincenew_service
can now return aFuture
. TheConnecting
is a future wrapping the new service future, returning aConnection
afterwards. In many cases,Future::flatten
can be used.(2dc6202f)
-
The
Server
is no longer created fromHttp::bind
, nor is itrun
. It is aFuture
that must be polled by anExecutor
.The
hyper::server::Http
type has move tohyper::server::conn::Http
.(c4974500)
-
Client:new(&handle)
andClient::configure()
are nowClient::new()
andClient::builder()
.(fe1578ac)
-
Error
is no longer an enum to pattern match over, or to construct. Code will need to be updated accordingly.For body streams or
Service
s, inference might be unable to determine what error type you mean to return.(5d3c4722)
-
All uses of
Handle
now need to be new-tokioHandle
.(27b8db3a)
-
Custom connectors should now implement
Connect
directly, instead ofService
.Calls to
connect
no longer takeUri
s, butDestination
. There arescheme
,host
, andport
methods to query relevant information.The returned future must be a tuple of the transport and
Connected
. If no relevant extra information is needed, simply returnConnected::new()
.(8c52c2df)
-
All code that was generic over the body as
Stream
must be adjusted to use aPayload
instead.hyper::Body
can still be used as aStream
.Passing a custom
impl Stream
will need to either implementPayload
, or as an easier option, switch toBody::wrap_stream
.Body::pair
has been replaced withBody::channel
, which returns ahyper::body::Sender
instead of afutures::sync::mpsc::Sender
.(fbc449e4)
-
Method
,Request
,Response
,StatusCode
,Version
, andUri
have been replaced with types from thehttp
crate.(3cd48b45)
- The variants of
Method
are now uppercase, for instance,Method::Get
is nowMethod::GET
. - The variants of
StatusCode
are now uppercase, for instance,StatusCode::Ok
is nowStatusCode::OK
. - The variants of
Version
are now uppercase, for instance,HttpVersion::Http11
is nowVersion::HTTP_11
.
- The variants of
-
The typed headers from
hyper::header
are gone for now.
The http::header
module is re-exported as hyper::header
.
For example, a before setting the content-length:
use hyper::header::ContentLength;
res.headers_mut().set(ContentLength(15));
And now after, with the http
types:
use hyper::header::{CONTENT_LENGTH, HeaderValue};
res.headers_mut().insert(CONTENT_LENGTH, HeaderValue::from_static("15"));
(3cd48b45)
-
The
mime
crate is no longer re-exported ashyper::mime
.The typed headers don't exist, and so they do not need the
mime
crate.To continue using
mime
for other purposes, add it directly to yourCargo.toml
as a dependency.(3cd48b45)
-
Removed
compat
cargo feature, andcompat
related API. This was the conversion methods for hyper's types to and fromhttp
crate's types.(3cd48b45)
-
Removed deprecated APIs: (a37e6b59)
- The
server-proto
cargo feature, which includedimpl ServerProto for Http
, and related associated types. client::Config::no_proto()
tokio_proto::streaming::Body::from(hyper::Body)
hyper::Body::from(tokio_proto::streaming::Body)
hyper::Body::from(futures::sync::mpsc::Receiver)
Http::no_proto()
- The
- client: prevent pool checkout looping on not-ready connections (ccec79da, closes #1519)
- server: skip SO_REUSEPORT errors (2c48101a, closes #1509)
- server: add Server::run_threads to run on multiple threads (8b644c1a)
- client: ensure idle connection is pooled before response body finishes (7fe9710a)
- header: remove charset=utf8 from
ContentType::text()
(ba789e65)
- server: prevent to output Transfer-encoding when server upgrade (#1465) (eb105679)
- client: introduce lower-level Connection API (1207c2b6, closes #1449)
- header: add
text()
andtext_utf8()
constructors toContentType
(45cf8c57) - server:
- client: return error if Request has
CONNECT
method (bfcdbd9f) - dependencies: require tokio-core 0.1.11 (49fcb066)
- client: add
Config::set_host
option (33a385c6)
- client:
- server:
- client:
- uri: make absolute-form uris always have a path (a9413d73)
- client: Client will retry requests on fresh connections (ee61ea9a)
- client: send an
Error::Cancel
if a queued request is dropped (88f01793)
- client: add
http1_writev
configuration option (b0aa6497)
- client: more reliably detect closed pooled connections (#1434) (265ad67c)
- h1: fix hung streaming bodies over HTTPS (73109694)
- client:
- server:
- server: add
Http::max_buf_size()
option (d22deb65, closes #1368) - uri: Add a
PartialEq<str>
impl forUri
(11b49c2c)
- h1: utilize
writev
when possible, reducing copies (68377ede)
- client: add
executor
method when configuring aClient
(c89019eb)
- client:
- lib: properly handle body streaming errors (7a48d0e8)
- client:
- conn: don't double shutdown in some cases (7d3abfbc)
- log: improve quality of debug level logs (7b593112)
- client:
- conn: handle when pre-emptive flushing closes the write state (8f938d97, closes #1391)
- lib: fix
no_proto
dispatcher 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
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)
- 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
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)
- add
- error: Display for Error shows better info (49e196db, closes #694)
- header:
- add ContentType::octet_stream() constructor (1a353102)
- change
Cookie
to 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::Brotli
variant (f0ab2b6a) - introduce
header::Raw
(#869) (50ccdaa7) - add
TE
header struct (#1150) (f1859dfd, closes #1109) - support Opaque origin headers (#1147) (41485997, closes #1065)
- add
HeaderView.raw()
(8143c33b) impl Eq for ContentType
(bba761ac)- add
Link
header implementation (592c1e21, closes #650) - add
star
,json
,text
,image
constructors 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
Warning
header (69894d19, closes #883) Headers::remove
returns the Header (9375addb, closes #891)- add
ContentLocation
header (13c5bf66, closes #870) - add
LastEventId
header (e1542a60) - add `Origin header (01843f88, closes #651)
- Add
ReferrerPolicy
header (3a86b3a2)
- http:
- lib:
- mime: upgrade to mime v0.3 (f273224f, closes #738)
- server:
- status:
- uri:
- version: impl
FromStr
forHttpVersion
(47f3aa62)
- The
Cookie
header is no longer a wrapper over aVec<String>
. It must be accessed via itsget
andset
methods.
(dd03e723)
- Any use of
Quality(num)
should change toq(num)
.
(a4644959)
HttpDate
no longer has public fields. Convert betweenHttpDate
andSystemTime
as needed.
(316c6fad)
- The
link_extensions
methods of theLink
header are removed until fixed.
(011f28cb)
- The
fmt_header
method 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
Encoding
enum has an additional variant,Trailers
.
(f1859dfd)
Origin.scheme
andOrigin.host
now returnOption
s, since theOrigin
could 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
Url
type is no longer used. Any instance in theClient
API has had it replaced withhyper::Uri
.This also means
Error::Uri
has changed types tohyper::error::UriError
.The type
hyper::header::parsing::HTTP_VALUE
has been made private, as an implementation detail. The functionhttp_percent_encoding
should be used instead.
(4fb7e6eb)
- This makes
Request.remote_addr
anOption<SocketAddr>
, instead ofSocketAddr
.
(e04bcc12)
- The
Preference
header had a typo in a variant and it's string representation, changePreference::HandlingLeniant
toPreference::HandlingLenient
. (2fa414fb) Server
is no longer the primary entry point. Instead, anHttp
type is created and then eitherbind
to receive aServer
, or it can be passed to other Tokio things. (f45e9c8e)- The name of
RequestUri
has changed toUri
. It is no longer anenum
, 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 abool
, it now returnsOption<H>
. To determine if a a header exists, switch toHeaders.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. UseStatusCode::try_from
instead.Also makes the
status
module private. All imports ofhyper::status::StatusCode
should behyper::StatusCode
.
(f953cafe)
- All usage of
status.class()
should change to equivalentstatus.is_*()
methods.
(94ee6204)
-
Most uses of
mime
will likely break. There is no moremime!
macro, nor aMime
constructor, norTopLevel
andSubLevel
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 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_header
to 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
cookie
dependency (f22701f7) - lib:
-
There is no more
hyper::http::h2
.(d301c6a1)
-
The
Cookie
andSetCookie
headers 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-serialization
feature. 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::Openssl
and related types are gone. TheClient
now uses anHttpConnector
by 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_config
will need to change to provide a network connector. For the same functionality, ahyper::net::HttpConnector
can 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
NetworkStream
trait,set_read_timeout
andset_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
EndError
that 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
Client
API, but for anyone usingHttpWriter
directly, 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_timeout
andset_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
__Nonexhaustive
variant 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
Client
must now also have aSync
bounds, 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
Http2
added to a public enumhyper::Error
.
(48e9ca2f)
hyper::client::request::Response
is no longer generic overNetworkStream
types. 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
Http
andError
have been removed from the Error type and its variants.HttpError
should now be accessed ashyper::Error
, and variants likeHttpIoError
should be accessed asError::Io
.
(9ba074d1)
- Add variant to Access-Control-Allow-Origin enum
(5e341714)
- Upgrade header Protocol changed.
(f47d11b9)
from_one_raw_str()
returnsNone
on 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)
AccessControlAllowHeaders
andAccessControlRequestHeaders
values are case insensitive now.AccessControlAllowOrigin
variants are nowAny
andValue
to match the other headers.
(94f38950)
If-Match
,If-None-Match
andVary
item variant name changed toItems
(38d297b1)
Etag
header field is nowETag
header 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
Reflect
bounds (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
http
module 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
FromPrimitive
methods to create them now. StatusCode and StatusClass can no longer be casted tou16
, useToPrimitive
methods 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
Cookie
toCookie
(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: