Commit Graph

72 Commits

Author SHA1 Message Date
Sean McArthur
da9b0319ef refactor(lib): update to 2018 edition 2019-07-09 15:16:01 -07:00
Sean McArthur
01c03db7ea chore(lib): add dyn keyword to trait objects (#1820)
Requires Rust 1.27.
2019-06-03 13:08:13 -07:00
Sean McArthur
155dc41e70 chore(CI): remove coveralls 2018-12-05 11:35:30 -08:00
Sean McArthur
65788fe7fe test(client): disable happy eyeballs tests except in CI 2018-12-05 10:57:37 -08:00
Sean McArthur
b05891906e chore(travis): set minimum rust version to 1.26 because of dependencies 2018-08-29 18:24:27 -07:00
Sean McArthur
abe8ddd637 chore(travis): set minimum rust version to 1.25 because of dependencies 2018-08-27 10:21:25 -07:00
Hrvoje Ban
02a9c29e2e feat(client): implement rfc 6555 (happy eyeballs)
Update client connector to attempt a parallel connection using
alternative address family, if connection using preferred address family
takes too long.

Closes: #1316
2018-07-10 13:43:03 -07:00
Sean McArthur
53f4c9dca1 chore(ci): skip building tests on minimum Rust version 2018-06-05 11:41:17 -07:00
Sean McArthur
8c393a15c9 chore(ci): disable logs in CI tests 2018-06-01 14:39:16 -07:00
Sean McArthur
18f4dd2406 chore(ci): remove flaky tests from failing CI 2018-05-09 16:02:49 -07:00
Sean McArthur
7a7453ba52 refactor(lib): change from futures-timer to tokio-timer 2018-04-30 19:11:05 -07:00
Sean McArthur
a4f4553487 chore(ci): enable logs in ci tests again... 2018-04-25 17:04:44 -07:00
Sean McArthur
34522041dd chore(ci): remove logs from test output 2018-04-24 15:29:19 -07:00
Sean McArthur
988dc7c637 chore(ci): enable logs in tests, publish docs with nightly rustdoc 2018-04-24 14:37:32 -07:00
Sean McArthur
d127201ef2 feat(rt): make tokio runtime optional
A Cargo feature `runtime` is added, which is enabled by default, that
includes the following:

- The `client::HttpConnector`, which uses `tokio::net::TcpStream`.
- The `server::AddrStream`, which uses `tokio::net::TcpListener`.
- The `hyper::rt` module, which includes useful utilities to work with
  the runtime without needing to import `futures` or `tokio` explicity.

Disabling the feature removes many of these niceties, but allows people
to use hyper in environments that have an alternative runtime, without
needing to download an unused one.
2018-04-23 16:56:26 -07:00
Sam Reis
27b8db3af8 feat(lib): convert to use tokio 0.1
BREAKING CHANGE: All uses of `Handle` now need to be new-tokio `Handle`.

Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2018-03-19 11:43:47 -07:00
Sean McArthur
3cd48b45fb feat(lib): replace types with those from http crate
BREAKING CHANGE: `Method`, `Request`, `Response`, `StatusCode`,
  `Version`, and `Uri` have been replaced with types from the `http`
  crate. The `hyper::header` module is gone for now.

  Removed `Client::get`, since it needed to construct a `Request<B>`
  with an empty body. Just use `Client::request` instead.

  Removed `compat` cargo feature, and `compat` related API.
2018-03-19 11:43:47 -07:00
Sean McArthur
dcfebc6308 chore(dependencies): update minimum Rust version to 1.21, because of tokio-core 2018-03-12 14:31:05 -07:00
Sean McArthur
b79f8d32b5 chore(ci): don't build docs on rust 1.18 2018-02-21 13:45:54 -08:00
Sean McArthur
5ce269ae7d chore(ci): update CI minimum Rust to 1.18 (because mio) 2018-01-09 15:53:06 -08:00
Sean McArthur
f7aeb1cab0 chore(ci): only build on Rust 1.17, don't run tests 2018-01-04 15:34:25 -08:00
Sean McArthur
6ade21aa7f feat(server): change default dispatcher
- Deprecates the `no_proto` configuration on `Server`. It is always
  enabled.
- Deprecates all pieces related to tokio-proto.
- Makes the tokio-proto crate optional, and the `server-proto` feature
  can be used to completely remove the dependency. It is enabled by
  default.
2017-12-28 19:15:57 -08:00
Sean McArthur
a453ea1064 test(lib): run coverage on integration tests 2017-11-14 15:40:13 -08:00
Sean McArthur
f7532b71d1 feat(lib): add support to disable tokio-proto internals
For now, this adds `client::Config::no_proto`, `server::Http::no_proto`,
and `server::Server::no_proto` to skip tokio-proto implementations, and
use an internal dispatch system instead.

`Http::no_proto` is similar to `Http::bind_connection`, but returns a
`Connection` that is a `Future` to drive HTTP with the provided service.
Any errors prior to parsing a request, and after delivering a response
(but before flush the response body) will be returned from this future.

See #1342 for more.
2017-10-27 00:02:07 -07:00
Sean McArthur
8ac1179d7c chore(ci): update minimum rustc version to 1.17 2017-10-09 09:40:53 -07:00
Sam Rijs
0c7d375ba3 feat(lib): implement compatibility with http crate 2017-09-22 12:07:57 -07:00
Sean McArthur
9036df2f4c chore(ci): update minimum rust version to 1.15 2017-06-03 14:42:42 -07:00
Mikhail Pak
a3c0e22a59 chore(travis): fix Travis coverage testing
* Move to the Trusty distro, since Precise is nearing end of life this year
  (https://blog.travis-ci.com/2017-04-17-precise-EOL)
* Add a --verify flag to avoid kcov segfaults.
  This was the reason why a 0% coverage was reported
* Link dead code to get more pessimistic results
2017-04-29 14:39:27 +02:00
Sean McArthur
736a342ea1 chore(travis): stop testing in non-existant doc directory 2017-04-17 10:42:22 -07:00
Sean McArthur
724d5e8669 chore(doc): remove unused doc folder 2017-04-17 10:29:28 -07:00
Sean McArthur
f05a58a1b2 chore(travis): set minimum rust version 2017-04-10 15:09:54 -07:00
Sean McArthur
c51a9993fa chore(travis): enable email notifications for broken builds 2017-03-02 15:33:42 -08:00
Sean McArthur
81f64b4af5 chore(travis): remove extra echos from travis.yml 2017-01-19 19:39:31 -08:00
Sean McArthur
c4572121fa chore(travis): update travis gh-pages token 2017-01-19 18:23:19 -08:00
Sean McArthur
b57a7a3df2 chore(travis): fix deploying docs after successful travis on master 2017-01-19 17:35:41 -08:00
Sean McArthur
e4232dd0d8 test(client): sleep disconnect test to reduce flakiness
Closes #1003
2017-01-16 12:58:06 -08:00
Sean McArthur
fef401921c chore(travis): only test integration benches, not run full benchmarks 2017-01-16 12:46:19 -08:00
Sean McArthur
be461b4663 perf(http): introduce MemBuf, a shared read buffer 2017-01-16 10:50:35 -08:00
Sean McArthur
2d2d5574a6 feat(lib): redesign API to use Futures and Tokio
There are many changes involved with this, but let's just talk about
user-facing changes.

- Creating a `Client` and `Server` now needs a Tokio `Core` event loop
to attach to.
- `Request` and `Response` both no longer implement the
`std::io::{Read,Write}` traits, but instead represent their bodies as a
`futures::Stream` of items, where each item is a `Chunk`.
- The `Client.request` method now takes a `Request`, instead of being
used as a builder, and returns a `Future` that resolves to `Response`.
- The `Handler` trait for servers is no more, and instead the Tokio
`Service` trait is used. This allows interoperability with generic
middleware.

BREAKING CHANGE: A big sweeping set of breaking changes.
2017-01-16 10:44:27 -08:00
Sean McArthur
0b02e61791 chore(travis): pipe git commands to dev null 2016-11-19 14:56:35 -08:00
Ahmed Charles
8b3c120684 feat(server): add path() and query() to Request
Closes #896 
Closes #897

BREAKING CHANGE: `RequestUri::AbsolutePath` variant is changed to a struct variant. Consider using `req.path()` or `req.query()` to get the relevant slice.
2016-08-29 13:45:38 -07:00
Sean McArthur
12c69b5dd0 docs(guide): add meat to the Server Guide
Closes #806
2016-07-25 20:23:44 -07:00
Sean McArthur
29b65f6bdd docs(guide): build and test markdown files in doc directory 2016-07-14 19:25:49 -07:00
Sean McArthur
e600cd89cb docs(lib): fix syntax error docs generation command 2016-06-20 16:05:12 -07:00
Sean McArthur
c94681fd76 docs(lib): only generate docs if on master branch or a tag commit 2016-06-20 14:03:50 -07:00
Sean McArthur
d35992d019 feat(lib): switch to non-blocking (asynchronous) IO
BREAKING CHANGE: This breaks a lot of the Client and Server APIs.
  Check the documentation for how Handlers can be used for asynchronous
  events.
2016-05-16 09:51:18 -07:00
Sean McArthur
4bdf52a482 Merge pull request #764 from hyperium/readme-tests
test(readme): test readme code fences
2016-04-19 17:25:03 -07:00
Sean McArthur
b98662ab6d test(readme): test readme code fences 2016-04-19 15:58:50 -07:00
Corey Farwell
e8826917d1 chore(travis): Enable Travis CI testing on OSX.
In preparation for https://github.com/hyperium/hyper/issues/755.
2016-04-16 21:02:04 -04:00
Corey Farwell
c53b5b242d chore(travis): Remove now default 'sudo: false'.
'sudo: false' is now default on Travis CI.
2016-04-16 16:59:27 -04:00