Skip to content

Commit 4976549

Browse files
committed
v0.12.0
1 parent 8ea5a46 commit 4976549

File tree

3 files changed

+129
-4
lines changed

3 files changed

+129
-4
lines changed

CHANGELOG.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,130 @@
1+
## v0.12.0 (2018-06-01)
2+
3+
4+
#### Bug Fixes
5+
6+
* **lib:** remove deprecated tokio-proto APIs ([a37e6b59](https://github.com/hyperium/hyper/commit/a37e6b59e6d6936ee31c6d52939869933c709c78))
7+
* **server:** panic on max_buf_size too small ([aac250f2](https://github.com/hyperium/hyper/commit/aac250f29d3b05d8c07681a407825811ec6a0b56))
8+
9+
10+
#### Features
11+
12+
* **body:**
13+
* remove `Body::is_empty()` ([19f90242](https://github.com/hyperium/hyper/commit/19f90242f8a3768b2d8d4bff4044a2d6c77d40aa))
14+
* change `Payload::Data` to be a `Buf` ([a3be110a](https://github.com/hyperium/hyper/commit/a3be110a55571a1ee9a31b2335d7aec27c04e96a), closes [#1508](https://github.com/hyperium/hyper/issues/1508))
15+
* add From<Box<Stream>> impl for Body ([45efba27](https://github.com/hyperium/hyper/commit/45efba27df90650bf4669738102ad6e432ddc75d))
16+
* introduce a `Payload` trait to represent bodies ([fbc449e4](https://github.com/hyperium/hyper/commit/fbc449e49cc4a4f8319647dccfb288d3d83df2bd), closes [#1438](https://github.com/hyperium/hyper/issues/1438))
17+
* **client:**
18+
* rename `FutureResponse` to `ResponseFuture` ([04c74ef5](https://github.com/hyperium/hyper/commit/04c74ef596eb313b785ecad6c42c0375ddbb1e96))
19+
* support local bind for `HttpConnector` ([b6a3c85d](https://github.com/hyperium/hyper/commit/b6a3c85d0f9ede10759dc2309502e88ea3e513f7), closes [#1498](https://github.com/hyperium/hyper/issues/1498))
20+
* add support for title case header names (#1497) ([a02fec8c](https://github.com/hyperium/hyper/commit/a02fec8c7898792cbeadde7e0f5bf111d55dd335), closes [#1492](https://github.com/hyperium/hyper/issues/1492))
21+
* add support to set `SO_NODELAY` on client HTTP sockets ([016d79ed](https://github.com/hyperium/hyper/commit/016d79ed2633e3f939a2cd10454cbfc5882effb4), closes [#1473](https://github.com/hyperium/hyper/issues/1473))
22+
* improve construction of `Client`s ([fe1578ac](https://github.com/hyperium/hyper/commit/fe1578acf628844d7cccb3e896c5e0bb2a0be729))
23+
* redesign the `Connect` trait ([8c52c2df](https://github.com/hyperium/hyper/commit/8c52c2dfd342e798420a0b83cde7d54f3af5e351), closes [#1428](https://github.com/hyperium/hyper/issues/1428))
24+
* **error:** revamp `hyper::Error` type ([5d3c4722](https://github.com/hyperium/hyper/commit/5d3c472228d40b57e47ea26004b3710cfdd451f3), closes [#1128](https://github.com/hyperium/hyper/issues/1128), [#1130](https://github.com/hyperium/hyper/issues/1130), [#1431](https://github.com/hyperium/hyper/issues/1431), [#1338](https://github.com/hyperium/hyper/issues/1338))
25+
* **http2:** add HTTP/2 support for Client and Server ([c119097f](https://github.com/hyperium/hyper/commit/c119097fd072db51751b100fa186b6f64785954d))
26+
* **lib:**
27+
* convert to use tokio 0.1 ([27b8db3a](https://github.com/hyperium/hyper/commit/27b8db3af8852ba8280a2868f703d3230a1db85e))
28+
* replace types with those from http crate ([3cd48b45](https://github.com/hyperium/hyper/commit/3cd48b45fb622fb9e69ba773e7f92b9d3e9ac018))
29+
* **rt:** make tokio runtime optional ([d127201e](https://github.com/hyperium/hyper/commit/d127201ef22b10ab1d84b3f2215863eb2d03bfcb))
30+
* **server:**
31+
* support HTTP1 and HTTP2 automatically ([bc6af88a](https://github.com/hyperium/hyper/commit/bc6af88a32e29e5a4f3719d8abc664f9ab10dddd), closes [#1486](https://github.com/hyperium/hyper/issues/1486))
32+
* re-design `Server` as higher-level API ([c4974500](https://github.com/hyperium/hyper/commit/c4974500abee45b95b0b54109cad15978ef8ced9), closes [#1322](https://github.com/hyperium/hyper/issues/1322), [#1263](https://github.com/hyperium/hyper/issues/1263))
33+
* **service:** introduce hyper-specific `Service` ([2dc6202f](https://github.com/hyperium/hyper/commit/2dc6202fe7294fa74cf1ba58a45e48b8a927934f), closes [#1461](https://github.com/hyperium/hyper/issues/1461))
34+
35+
36+
#### Breaking Changes
37+
38+
* `Body::is_empty()` is gone. Replace with
39+
`Body::is_end_stream()`, from the `Payload` trait.
40+
41+
([19f90242](https://github.com/hyperium/hyper/commit/19f90242f8a3768b2d8d4bff4044a2d6c77d40aa))
42+
* Each payload chunk must implement `Buf`, instead of
43+
just `AsRef<[u8]>`.
44+
45+
([a3be110a](https://github.com/hyperium/hyper/commit/a3be110a55571a1ee9a31b2335d7aec27c04e96a))
46+
* Replace any references of
47+
`hyper::client::FutureResponse` to `hyper::client::ResponseFuture`.
48+
49+
([04c74ef5](https://github.com/hyperium/hyper/commit/04c74ef596eb313b785ecad6c42c0375ddbb1e96))
50+
* The `Service` trait has changed: it has some changed
51+
associated types, and `call` is now bound to `&mut self`.
52+
53+
The `NewService` trait has changed: it has some changed associated
54+
types, and `new_service` now returns a `Future`.
55+
56+
`Client` no longer implements `Service` for now.
57+
58+
`hyper::server::conn::Serve` now returns `Connecting` instead of
59+
`Connection`s, since `new_service` can now return a `Future`. The
60+
`Connecting` is a future wrapping the new service future, returning
61+
a `Connection` afterwards. In many cases, `Future::flatten` can be
62+
used.
63+
64+
([2dc6202f](https://github.com/hyperium/hyper/commit/2dc6202fe7294fa74cf1ba58a45e48b8a927934f))
65+
* The `Server` is no longer created from `Http::bind`,
66+
nor is it `run`. It is a `Future` that must be polled by an
67+
`Executor`.
68+
69+
The `hyper::server::Http` type has move to
70+
`hyper::server::conn::Http`.
71+
72+
([c4974500](https://github.com/hyperium/hyper/commit/c4974500abee45b95b0b54109cad15978ef8ced9))
73+
* `Client:new(&handle)` and `Client::configure()` are now
74+
`Client::new()` and `Client::builder()`.
75+
76+
([fe1578ac](https://github.com/hyperium/hyper/commit/fe1578acf628844d7cccb3e896c5e0bb2a0be729))
77+
* `Error` is no longer an enum to pattern match over, or
78+
to construct. Code will need to be updated accordingly.
79+
80+
For body streams or `Service`s, inference might be unable to determine
81+
what error type you mean to return. Starting in Rust 1.26, you could
82+
just label that as `!` if you never return an error.
83+
84+
([5d3c4722](https://github.com/hyperium/hyper/commit/5d3c472228d40b57e47ea26004b3710cfdd451f3))
85+
* All uses of `Handle` now need to be new-tokio `Handle`.
86+
87+
([27b8db3a](https://github.com/hyperium/hyper/commit/27b8db3af8852ba8280a2868f703d3230a1db85e))
88+
* Custom connectors should now implement `Connect`
89+
directly, instead of `Service`.
90+
91+
Calls to `connect` no longer take `Uri`s, but `Destination`. There
92+
are `scheme`, `host`, and `port` methods to query relevant
93+
information.
94+
95+
The returned future must be a tuple of the transport and `Connected`.
96+
If no relevant extra information is needed, simply return
97+
`Connected::new()`.
98+
99+
([8c52c2df](https://github.com/hyperium/hyper/commit/8c52c2dfd342e798420a0b83cde7d54f3af5e351))
100+
* All code that was assuming the body was a `Stream` must
101+
be adjusted to use a `Payload` instead.
102+
103+
`hyper::Body` can still be used as a `Stream`.
104+
105+
Passing a custom `impl Stream` will need to either implement
106+
`Payload`, or as an easier option, switch to `Body::wrap_stream`.
107+
108+
`Body::pair` has been replaced with `Body::channel`, which returns a
109+
`hyper::body::Sender` instead of a `futures::sync::mpsc::Sender`.
110+
111+
([fbc449e4](https://github.com/hyperium/hyper/commit/fbc449e49cc4a4f8319647dccfb288d3d83df2bd))
112+
* `Method`, `Request`, `Response`, `StatusCode`,
113+
`Version`, and `Uri` have been replaced with types from the `http`
114+
crate. The `hyper::header` module is gone for now.
115+
116+
Removed `Client::get`, since it needed to construct a `Request<B>`
117+
with an empty body. Just use `Client::request` instead.
118+
119+
Removed `compat` cargo feature, and `compat` related API.
120+
121+
([3cd48b45](https://github.com/hyperium/hyper/commit/3cd48b45fb622fb9e69ba773e7f92b9d3e9ac018))
122+
* Many of these APIs have been deprecated for a while,
123+
check the documentation for the recommended way to use hyper now.
124+
125+
([a37e6b59](https://github.com/hyperium/hyper/commit/a37e6b59e6d6936ee31c6d52939869933c709c78))
126+
127+
1128
### v0.11.27 (2018-05-16)
2129

3130

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "hyper"
4-
version = "0.12.0-pre.0" # don't forget to update html_root_url
4+
version = "0.12.0" # don't forget to update html_root_url
55
description = "A fast and correct HTTP library."
66
readme = "README.md"
77
homepage = "https://hyper.rs"
@@ -12,8 +12,6 @@ authors = ["Sean McArthur <[email protected]>"]
1212
keywords = ["http", "hyper", "hyperium"]
1313
categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"]
1414

15-
publish = false # pre
16-
1715
include = [
1816
"Cargo.toml",
1917
"LICENSE",

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![doc(html_root_url = "https://docs.rs/hyper/0.11.22")]
1+
#![doc(html_root_url = "https://docs.rs/hyper/0.12.0")]
22
#![deny(missing_docs)]
33
#![deny(warnings)]
44
#![deny(missing_debug_implementations)]

0 commit comments

Comments
 (0)