422 Commits

Author SHA1 Message Date
Sean McArthur
889fa2d872 feat(client): remove hyper::client::server (#2940)
BREAKING CHANGE: Tower `Service` utilities will exist in `hyper-util`.
2022-08-12 13:54:45 -07:00
Sean McArthur
0c8ee93d7f feat(client,server): remove tcp feature and code (#2929)
This removes the `tcp` feature from hyper's `Cargo.toml`, and the code it enabled:

- `HttpConnector`
- `GaiResolver`
- `AddrStream`

And parts of `Client` and `Server` that used those types. Alternatives will be available in the `hyper-util` crate.

Closes #2856 
Co-authored-by: MrGunflame <mrgunflame@protonmail.com>
2022-07-29 10:07:09 -07:00
Oddbjørn Grødem
ce72f73464 feat(lib): remove stream cargo feature (#2896)
Closes #2855
2022-06-23 15:12:24 -07:00
Sean McArthur
2c7344a65b chore(lib): begin 1.0 development (#2882) 2022-06-08 16:28:18 -07:00
Sean McArthur
f8e2a83194 v0.14.19 2022-05-27 12:05:38 -07:00
Nylonicious
3a755a632d chore(lib): update tokio-util to 0.7 (#2762) 2022-05-26 16:26:31 -07:00
Sean McArthur
53f15e5870 v0.14.18 2022-03-22 14:12:13 -07:00
Rémy Rakic
1c6637060e fix(ffi): don't build C libraries by default
Remove unconditional building of FFI libraries: now
that nightly supports --crate-type, it can be opted into.
This fixes cargo's pipelining both for dependencies and
for dependent crates, resulting in faster from-scratch builds.
2022-03-03 15:05:42 -08:00
Sean McArthur
c734b7904d v0.14.17 2022-02-10 12:49:30 -08:00
Anthony Ramine
1f0c177b35 feat(http1): implement obsolete line folding (#2734)
The client now has an option to allow parsing responses with obsolete line folding in headers. The option is off by default, since the spec recommends to reject such things if you can.
2022-02-09 12:59:23 -08:00
Bruce Mitchener
02f3630af6 chore(dependencies): update to itoa 1 2021-12-14 10:55:21 -08:00
Sean McArthur
41dee4a79b v0.14.16 2021-12-09 10:14:08 -08:00
Sean McArthur
bff977b73c feat(http2): add http2_max_send_buf_size option to client and server
This value is like a high-water mark. It applies per stream. Once a
stream has buffered that amount of bytes to send, it won't poll more
data from the `HttpBody` until the stream has been able to flush under
it.
2021-12-09 10:06:14 -08:00
Paolo Barbolini
842c6553a5 feat(server): add HTTP/1 header read timeout option (#2675)
Adds `Server::http1_header_read_timeout(Duration)`. Setting a duration will determine how long a client has to finish sending all the request headers before trigger a timeout test. This can help reduce resource usage when bad actors open connections without sending full requests.

Closes #2457
2021-11-18 12:02:06 -08:00
Sean McArthur
d0b1d9ed3a v0.14.15 2021-11-16 11:56:51 -08:00
Sean McArthur
b5022f3854 v0.14.14 2021-10-22 09:53:21 -07:00
Dai Dao
3908eeb788 docs(examples): updated imports in client_json example (#2412) 2021-09-16 16:34:10 -07:00
Sean McArthur
6a876b8ed2 v0.14.13 2021-09-16 10:25:36 -07:00
Sean McArthur
f46b175bf7 v0.14.12 2021-08-24 16:24:51 -07:00
Sean McArthur
adaa8b3f0e chore(dependencies): require httparse 1.5.1 2021-08-19 11:30:41 -07:00
Sean McArthur
54b57c4797 chore(dependencies): remove tower-util dev-dependency (#2603) 2021-07-30 15:07:11 -07:00
Sean McArthur
19f38b3e7f v0.14.11 2021-07-21 15:06:07 -07:00
Sean McArthur
9b69cbc254 v0.14.10 2021-07-07 11:33:08 -07:00
Sean McArthur
8b71a67413 v0.14.9 2021-06-07 12:52:37 -07:00
Jonas Platte
6a6a24030e refactor(lib): Switch from pin-project to pin-project-lite (#2566)
Note the practical affects of this change:

- Dependency count with --features full dropped from 65 to 55.
- Time to compile after a clean dropped from 48s to 35s (on a pretty underpowered VM).

Closes #2388
2021-06-04 14:57:27 -07:00
Sean McArthur
e61b494e3b v0.14.8 2021-05-25 08:12:49 -07:00
Anthony Ramine
5442b6fadd feat(http2): Implement Client-side CONNECT support over HTTP/2 (#2523)
Closes #2508
2021-05-24 18:20:44 +00:00
Sean McArthur
963dc23f0d v0.14.7 2021-04-22 09:52:41 -07:00
Sean McArthur
7f69d8f94c v0.14.6 2021-04-21 16:19:31 -07:00
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