Commit Graph

8 Commits

Author SHA1 Message Date
Sean McArthur
121c33132c feat(upgrade): Moved HTTP upgrades off Body to a new API (#2337)
Closes #2086

BREAKING CHANGE: The method `Body::on_upgrade()` is gone. It is
  essentially replaced with `hyper::upgrade::on(msg)`.
2020-11-19 16:36:12 -08:00
Sean McArthur
0dc89680cd style(lib): run rustfmt and enforce in CI 2019-12-05 13:55:17 -08:00
Sean McArthur
cb3f39c2dc feat(lib): update Tokio, bytes, http, h2, and http-body 2019-12-04 10:56:34 -08:00
lzutao
ae75b3a732 chore(lib): remove async_await feature gate (#1909)
`async_await` is stabilized in rust-lang/rust#63209.
2019-08-21 11:09:14 -07:00
Daiki Mizukami
0d3cbe28fc refactor(rt): remove re-export of tokio::main (#1879)
Closes #1878.

BREAKING CHANGE: Replace all usage of `rt::main` with `tokio::main`.
2019-07-22 10:06:36 -07:00
Weihang Lo
7cdfd3d974 docs(examples): update upgrade example to async/await 2019-07-15 11:35:33 -07:00
Sean McArthur
5da17df97f chore(lib): individually disable tests and examples that aren't updated 2019-07-12 13:44:03 -07:00
Sean McArthur
fea29b29e2 feat(http1): Add higher-level HTTP upgrade support to Client and Server (#1563)
- Adds `Body::on_upgrade()` that returns an `OnUpgrade` future.
- Adds `hyper::upgrade` module containing types for dealing with
  upgrades.
- Adds `server::conn::Connection::with_upgrades()` method to enable
  these upgrades when using lower-level API (because of a missing
  `Send` bound on the transport generic).
- Client connections are automatically enabled.
- Optimizes request parsing, to make up for extra work to look for
  upgrade requests.
  - Returns a smaller `DecodedLength` type instead of the fatter
    `Decoder`, which should also allow a couple fewer branches.
  - Removes the `Decode::Ignore` wrapper enum, and instead ignoring
    1xx responses is handled directly in the response parsing code.

Ref #1563 

Closes #1395
2018-06-14 13:39:29 -07:00