Commit Graph

2560 Commits

Author SHA1 Message Date
Anthony Ramine
c490208038 Introduce hyper::ext::Http1RawMessage 2023-11-16 13:49:10 +01:00
tottoto
48997034ed chore(ci): cache rust dependency 2023-11-08 09:27:42 -05:00
tottoto
e2c223a246 chore(ffi): revamp gen_header using cargo-expand 2023-11-08 09:27:42 -05:00
tottoto
45fef3be27 chore(ci): check C header file with stable rust 2023-11-08 09:27:42 -05:00
tottoto
5bddd5e4c4 chore(ci): use stable rust for building C API 2023-11-08 09:27:42 -05:00
tottoto
440f23a834 chore(ci): replace actions-rs with run and use taiki-e/install-action or taiki-e/cache-cargo-install-action 2023-11-08 09:27:42 -05:00
tottoto
43c6b1f892 chore(ci): use cargo-hack --no-dev-deps option to check without dev-dependencies 2023-11-08 09:27:42 -05:00
tottoto
d17945b57a chore(ci): replace actions-rs/toolchain with dtolnay/rust-toolchain 2023-11-08 09:27:42 -05:00
tottoto
c1caff4fc4 chore(ci): update to actions/checkout@v4 2023-11-08 09:27:42 -05:00
tottoto
6803436ecb fix(examples): add backports feature requirement to tower_client example (#3396) 2023-11-07 11:48:33 -05:00
tottoto
a3c9fde7b3 refactor(common): replace Never with Infallible (#3392) 2023-11-06 09:03:28 -05:00
tottoto
8e6095e43d refactor(common): remove common re-export (#3391) 2023-11-06 08:38:51 -05:00
tottoto
06137bc861 style(lib): cargo fmt cfg workaround (#3384) 2023-11-06 07:01:57 -05:00
tottoto
d305503106 chore(lib): fix lint error (#3386) 2023-11-04 06:22:02 -04:00
gngpp
34d3800849 fix(client): panic when pool idle timeout set to zero (#3365)
From issue: https://github.com/hyperium/hyper/issues/2997
2023-10-20 07:07:43 -04:00
gngpp
41eaf2042b fix(client): divide by zero error when DNS returns no addrs (#3355)
Consider addrs length is 0.

From issue: seanmonstar/reqwest#2003
2023-10-19 12:21:20 -04:00
tottoto
a22c5122e1 chore(dependencies): Allow socket2 0.5 (#3314) 2023-09-18 16:38:28 -04:00
Sean McArthur
3d8fffc30c chore(msrv): increase MSRV to 1.63 (#3320) 2023-09-18 12:14:45 -04:00
Tom Karwowski
d342c2c714 feat(server): add Builder::local_addr() (#3278) 2023-08-07 15:22:21 -04:00
包布丁
45aa624941 fix(client): Do not strip path and scheme components from URIs for HTTP/2 Extended CONNECT requests (#3242) 2023-08-03 13:33:56 -04:00
Artem Medvedev
aac6760e03 fix(client): early respond from server shouldn't propagate reset error (#3274)
Closes #2872 for `0.14.x` version.
2023-07-26 15:47:45 -04:00
Sean McArthur
d77c2599bc v0.14.27 v0.14.27 2023-06-26 12:09:27 -04:00
Sean McArthur
a7b2c825b2 chore(lib): disable log feature of tower dependency 2023-06-20 08:24:39 -04:00
Sean McArthur
b107655ff8 fix(http1): send error on Incoming body when connection errors (#3256)
If a connection has any error besides reading, a streaming body
sometimes wouldn't be notified. This change makes it so that when a
connection task is closing because of any error, an existing body
channel is also notified.

Closes #3253
2023-06-20 08:24:39 -04:00
Sean McArthur
32422c47ec fix(http1): properly end chunked bodies when it was known to be empty (#3254)
Closes #3252
2023-06-20 08:24:39 -04:00
Anthony Ramine
297dc4c8ea feat(client): include connection info in Client::send_request errors (#2749) 2023-04-14 11:41:08 -04:00
Sean McArthur
00d52e4fb7 v0.14.26 v0.14.26 2023-04-13 16:09:57 -04:00
Noah Kennedy
a6f7571a52 feat(http2): add max_pending_accept_reset_streams configuration option (#3201)
This allows users to set the configuration option from https://github.com/hyperium/h2/pull/668.
2023-04-13 14:40:17 -04:00
Sean McArthur
a9d4e8321c v0.14.25 v0.14.25 2023-03-10 13:34:50 -05:00
Sean McArthur
645db19125 docs(lib): document backport and deprecated features (#3166) 2023-03-10 11:00:23 -05:00
Sean McArthur
fc111eb332 chore(ci): test deprecations in CI (#3162) 2023-03-09 17:22:01 -05:00
Oddbjørn Grødem
86bc7505c8 refactor(server): allow deprecated in the server module (#3165) 2023-03-09 20:56:40 +00:00
Oddbjørn Grødem
02fe20f232 feat(server): deprecate server conn structs (#3161) 2023-03-09 13:27:14 -05:00
Oddbjørn Grødem
84881c9e51 feat(server): backport the split server conn modules from 1.0 (#3102)
Closes #3079
2023-03-08 18:33:21 -05:00
wuweichao
0368a41a6c feat(server): remove some Unpin and 'static constraints (#3119) 2023-03-07 16:20:11 -05:00
Sean McArthur
0ced15d3cc feat(client): deprecate client::conn types (#3156)
`client::conn::{SendRequest, Connection, Builder, handshake}` are deprecated as they are removed in 1.0.

This adds the `deprecated` feature to Cargo, and only when `hyper/deprecated` is enabled will these warnings be emitted.

Co-authored-by: KOVACS Tamas <ktamas@fastmail.fm>
2023-03-07 15:20:50 -05:00
Sean McArthur
253cc74d86 feat(client): add 1.0 compatible client conn API (#3155)
This patch backports client/conn/http1 and http2 modules from 1.0 to
ease transition. It allows code still using 0.14.x to switch to the
per-version Connection types available in 1.0.

Closes #3053 

Co-authored-by: KOVACS Tamas <ktamas@fastmail.fm>
2023-03-06 13:33:22 -05:00
Russell Cohen
c8493399b2 feat(client): add client::connect::capture_connection() (#3144)
Add `capture_connection` functionality. This allows callers to retrieve the `Connected` struct of the connection that was used internally by Hyper. This is in service of https://github.com/hyperium/hyper/issues/2605.

Although this uses `http::Extensions` under the hood, the API exposed explicitly hides that detail.
2023-02-22 12:24:20 -05:00
Russell Cohen
37ed5a2e3c feat(client): add poison to Connected (#3145)
Add `poison` method to `Connected`. This allows callers to mark a connection as poisoned which prevents the pool from reusing it on subsequent requests. `is_open` will consider poisoning prior to returning a connection to the pool.
2023-02-20 14:08:26 -05:00
Sean McArthur
40c01dfb4f v0.14.24 v0.14.24 2023-02-02 09:39:38 -05:00
Sean McArthur
92443d7ef5 fix(server): prevent sending 100-continue if user drops request body (#3138) 2023-02-02 09:35:07 -05:00
Sean McArthur
4d89adce61 fix(body): set an internal max to reserve in to_bytes
Previously, `to_bytes` would reserve extra space if after two chunks,
there was more remaining. It used to reserve however much space the peer
advertized.

This changes now only reserves up to ~16kb. This way, a slow message
with a big body doesn't reserve so much memory, until the data has
actually been received.

The existing warning to check for a length before calling the function
is still the best approach.
2023-01-12 11:13:39 -05:00
Jiahao Liang
031425f087 feat(http2): add http2_max_header_list_size to hyper::server::Builder (#3006)
fix incomplete changes introduced from #2828
2022-12-20 16:58:01 -05:00
Sean McArthur
d32beb3843 v0.14.23 v0.14.23 2022-11-07 14:17:09 -05:00
Sean McArthur
4912c6dbca chore(dependencies): enable socket2 'all' feature (#3047)
Closes #3045
2022-11-07 10:54:35 -05:00
jfourie1
2f1c0b720d fix(http2): Fix race condition in client dispatcher (#3041)
There exists a race condition in ClientTask::poll() when the request
that is sent via h2::client::send_request() is pending open. A task will
be spawned to wait for send capacity on the sendstream. Because this
same stream is also stored in the pending member of
h2::client::SendRequest the next iteration of the poll() loop can call
poll_ready() and call wait_send() on the same stream passed into the
spawned task.

Fix this by always calling poll_ready() after send_request(). If this
call to poll_ready() returns Pending save the necessary context in
ClientTask and only spawn the task that will eventually resolve to the
response after poll_ready() returns Ok.

Closes #2419
2022-11-07 09:38:28 -05:00
Sean McArthur
04d637ec66 v0.14.22 v0.14.22 2022-10-31 10:37:16 -07:00
Sean McArthur
e8765e0feb fix(server): fix compile-time cfgs for TCP keepalive options (#3039)
Closes #3038
2022-10-31 13:35:19 -04:00
Sean McArthur
9ad4055fbf v0.14.21 v0.14.21 2022-10-31 09:37:42 -04:00
Anthony Ramine
9fa363829c fix(client): send an error back to client when dispatch misbehaves (fixes #2649) 2022-10-28 14:57:22 -04:00