Commit Graph

393 Commits

Author SHA1 Message Date
Anthony Ramine
11345394d9 feat(client): add option to allow misplaced spaces in HTTP/1 responses (#2506) 2021-04-20 14:17:48 -07:00
pyfisch
96f7222435 chore(dependencies): Update httpdate to v1.0 (#2485)
Previous version would return wrong results for `Ord`.
2021-04-06 10:43:01 -07:00
Sean McArthur
98e7e0bd15 v0.14.5 2021-03-26 12:03:24 -07:00
Thomas de Zeeuw
41f99578a5 refactor(dependencies): update to socket2 v0.4.0 (#2472) 2021-03-22 15:16:31 -07:00
Sean McArthur
f162ca2f2f docs(ffi): generate FFI documentation (#2447) 2021-02-26 19:00:37 -08:00
David Pedersen
6efc1a1cce docs(server): add server example using tower::make::Shared (#2440)
`tower` 0.4.5 introduced `Shared` which is a `MakeService` that produces
services by cloning an inner service. This works quite well with `hyper`
if your service doesn't need the incoming connection and implements
`Clone`.

However that might not be entirely obvious so I thought it made sense to
add an example to the docs.

I wasn't quite sure if the example should go in the server or service
module docs but since there already is an example using
`make_service_fn` in the server docs I opted to add it there. Let me
know if you'd rather have it somewhere else.
2021-02-19 13:50:43 -08:00
Sean McArthur
196d9bd69c v0.14.4 2021-02-05 15:54:38 -08:00
Sean McArthur
7390f026d7 Revert "refactor(lib): Switch from pin-project to pin-project-lite"
This reverts commit 43412a950f.
2021-02-05 15:51:56 -08:00
Sean McArthur
48d4594930 v0.14.3 2021-02-05 14:11:35 -08:00
Jonas Platte
43412a950f refactor(lib): Switch from pin-project to pin-project-lite 2021-01-28 14:09:53 -08:00
Sean McArthur
3ae1581a53 feat(ffi): Initial C API for hyper 2021-01-08 10:25:53 -08:00
Sean McArthur
8861f9a786 v0.14.2 2020-12-29 10:51:50 -08:00
Maxim Zhukov
510b998ff3 chore(dev-dependencies): bump url to 2.2 (#2379) 2020-12-28 15:52:28 -08:00
Sean McArthur
3d6bdbe850 v0.14.1 2020-12-23 13:01:14 -08:00
Sean McArthur
c784a10174 v0.14.0 2020-12-23 10:58:04 -08:00
Sean McArthur
fad42acc79 feat(lib): Upgrade to Tokio 1.0 (#2369)
Closes #2370
2020-12-23 10:36:12 -08:00
Linus Färnstrand
21dea21145 chore(dependencies): upgrade socket2 (#2349)
Upgrades to a version not making invalid assumptions about
the memory layout of std::net::SocketAddr
2020-11-30 05:48:28 -08:00
Robert Clipsham
1ba2a141a6 test(client): Upgrade libpnet depedency to 0.27.2 [#2347] (#2348)
Additionally, only depend on pnet_datalink to reduce compile times.

Closes #2347
2020-11-27 21:55:03 -08:00
Michael Hewson
db32e1050c feat(lib): remove dependency on tracing's log feature (#2342)
Closes #2326

BREAKING CHANGE: hyper no longer emits `log` records automatically.
  If you need hyper to integrate with a `log` logger (as opposed to `tracing`),
  you can add `tracing = { version = "0.1", features = ["log"] }` to activate them.
2020-11-25 12:41:58 -08:00
Eliza Weisman
751c122589 feat(lib): update bytes to 0.6, update http-body (#2339)
This branch updates `bytes` and `http-body` to the latest versions. The
`http-body` version that uses `bytes` 0.6 hasn't been released yet, so
we depend on it via a git dep for now. Presumably Hyper and `http-body`
will synchronize their releases.

Other than that, this is a pretty mechanical update. Should fix the
build and unblock the `h2` update to use vectored writes.
2020-11-19 16:23:32 -08:00
Sean McArthur
ed2b22a7f6 feat(lib): disable all optional features by default (#2336)
BREAKING CHANGE: All optional features have been disabled by default.
2020-11-19 10:05:39 -08:00
Eliza Weisman
abb6471690 refactor(client): use tokio's TcpSocket for more sockopts (#2335)
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-11-18 14:45:45 -08:00
Sean McArthur
bdb5e5d694 feat(server): Make the server code an optional feature (#2334)
cc #2223 

BREAKING CHANGE: The HTTP server code is now an optional feature. To
  enable the server, add `features = ["server"]` to the dependency in
  your `Cargo.toml`.
2020-11-18 11:02:20 -08:00
Sean McArthur
4e55583d30 feat(client): Make client an optional feature
cc #2223

BREAKING CHANGE: The HTTP client of hyper is now an optional feature. To
  enable the client, add `features = ["client"]` to the dependency in
  your `Cargo.toml`.
2020-11-17 17:06:25 -08:00
Sean McArthur
2a19ab74ed feat(http1): Make HTTP/1 support an optional feature
cc #2251

BREAKING CHANGE: This puts all HTTP/1 methods and support behind an
  `http1` cargo feature, which will not be enabled by default. To use
  HTTP/1, add `features = ["http1"]` to the hyper dependency in your
  `Cargo.toml`.
2020-11-17 10:42:20 -08:00
Sean McArthur
b819b428d3 feat(http2): Make HTTP/2 support an optional feature
cc #2251

BREAKING CHANGE: This puts all HTTP/2 methods and support behind an
  `http2` cargo feature, which will not be enabled by default. To use
  HTTP/2, add `features = ["http2"]` to the hyper dependency in your
  `Cargo.toml`.
2020-11-10 13:40:34 -08:00
Sean McArthur
1b9af22fa0 Tokio 0.3 Upgrade (#2319)
Co-authored-by: Urhengulas <johann.hemmann@code.berlin>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2020-11-05 17:17:21 -08:00
Sean McArthur
cc7d3058e8 chore(lib): start 0.14.x development 2020-11-02 16:17:15 -08:00
Sean McArthur
42560c7c40 v0.13.9 2020-11-02 15:20:53 -08:00
Ivan Nikulin
fb19f3a869 feat(client): add HttpConnector::set_local_addresses to set both IPv6 and IPv4 local addrs (#2172)
Currently HttpConnector::set_local_address method accepts a single
argument. Server might not support IPv6 or IPv4. Therefore, the only
solution at the moment is to manually perform DNS resolution and pick
appropriate local address family. This is inefficient, as leads to
2 DNS lookups per request. This commit allows specifying both IPv4
and IPv6, so connector can decide which one to use based on DNS
resolution results.
2020-10-13 16:02:16 -07:00
Taiki Endo
02732bef0c chore(dependencies): update pin-project to 1.0 (#2298) 2020-10-13 11:14:47 -07:00
Sean McArthur
523d66a41f refactor(body): fix unused sync_wrapper when stream feature disabled (#2287) 2020-09-21 13:57:58 -07:00
Sean McArthur
aea9c52808 v0.13.8 2020-09-18 10:44:16 -07:00
Sean McArthur
25a05894b9 refactor(h1): use httpdate for server date header 2020-07-28 17:48:32 -07:00
JohnMartin95
f4f14b30e3 chore(dependencies): require tokio 0.2.11 (#2252)
Closes #2250
2020-07-28 16:49:09 -07:00
Sean McArthur
4216b2de70 v0.13.7 2020-07-13 17:03:48 -07:00
David Barsky
9832aef9ee feat(lib): Move from log to tracing in a backwards-compatible way (#2204)
I've moved Hyper from `log` to `tracing`. Existing `log`-based users shouldn't notice a difference, but `tracing` users will see higher performance when filtering data. This isn't the _end_  of the `tracing` integration that can happen in `Hyper` (e.g., Hyper can start using spans, typed fields, etc.), but _something_ is better than nothing. I'd rather address those points, including examples, in followups.

I've attached a screenshot of the `hello` example working, but the logged information is pulled from `tracing`, not `log`.

<img width="514" alt="Screen Shot 2020-05-16 at 1 23 19 PM" src="https://user-images.githubusercontent.com/2067774/82126298-d8103800-9779-11ea-8f0b-57c632c684d6.png">
2020-07-06 18:30:41 -07:00
Taiki Endo
9998f0fd0b refactor(lib): remove pin related unsafe code (#2220) 2020-06-08 16:02:14 -07:00
Taiki Endo
d5d09ed753 refactor(lib): Remove uses of pin_project::project attribute (#2219)
pin-project will deprecate the project attribute due to some unfixable
limitations.

Refs: https://github.com/taiki-e/pin-project/issues/225
2020-06-05 16:53:58 -07:00
Sean McArthur
b6fb18aee0 v0.13.6 2020-05-29 11:55:20 -07:00
Joshua Nelson
d5b0ee5672 refactor(client): switch from net2 to socket2 (#2206)
net2 was recently deprecated; socket2 is the recommended alternative

Closes #2205
2020-05-18 17:19:38 -07:00
Nikolai Kuklin
203621e3be feat(example): read file by chunks in send_file example (#2193) 2020-04-24 13:02:58 -07:00
Bastien Orivel
e08a271eb9 chore(dependencies): Force tokio to be at least 0.2.5 (#2186)
Without this, you can end up with tokio 0.2.4 and hyper 0.13.5 in your
project, leading to a compile error like this:

```
error[E0599]: no method named `try_recv` found for struct `tokio::sync::mpsc::unbounded::UnboundedReceiver<client::dispatch::Envelope<T, U>>` in the current scope
   --> src/client/dispatch.rs:161:26
    |
161 |         match self.inner.try_recv() {
    |                          ^^^^^^^^ method not found in `tokio::sync::mpsc::unbounded::UnboundedReceiver<client::dispatch::Envelope<T, U>>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `hyper`.
```
2020-04-18 08:18:28 -07:00
Sean McArthur
ffb759701c v0.13.5 2020-04-17 12:29:50 -07:00
Sean McArthur
22fcd66241 v0.13.4 2020-03-20 16:13:44 -07:00
Sean McArthur
5b046a1f8f v0.13.3 2020-03-03 15:34:49 -08:00
Sean McArthur
6a1bd055fc refactor(http2): store bdp sampler in Body H2 variant 2020-03-03 14:48:42 -08:00
Sean McArthur
141207769f v0.13.2 2020-01-29 12:41:58 -08:00
Sean McArthur
2983395d63 chore(lib): update pretty_env_logger to v0.4 (#2123) 2020-01-29 12:08:43 -08:00
Sean McArthur
5c6536317c docs(examples): improve README for examples directory 2020-01-29 11:09:21 -08:00