issue_numbers listlengths 1 2 | version stringclasses 20
values | base_commit stringlengths 40 40 | patch stringlengths 214 153k | hints_text stringlengths 0 66.9k | created_at stringlengths 20 20 | pull_number int64 20 3.81k | problem_statement stringlengths 22 7.42k | instance_id stringlengths 18 20 | test_patch stringlengths 288 262k | repo stringclasses 1
value | environment_setup_commit stringclasses 21
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
"3811"
] | 0.14 | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/proto/h1/io.rs
+++ b/src/proto/h1/io.rs
@@ -248,7 +248,11 @@ where
}
}
if curr_len > 0 {
+ trace!("partial headers; {} bytes so far", curr_len);
... | Thanks for the sample code, I'll get this fixed today 🫡 | 2024-12-16T15:39:30Z | 3,813 | Intermittent panic in is_complete_fast
**Version**
1.5.1
**Platform**
`Darwin ghost.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64`
**Description**
Hyper client can panic when processing broken up 1xx HTTP1 responses.
When a server r... | hyperium__hyper-3813 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -2908,6 +2908,63 @@ mod conn {
assert_eq!(vec, b"bar=foo");
}
+ #[tokio::test]
+ async fn client_100_then_http09() {
+ let _ = ::pretty_env_logger::try_init();
+
+ let server = TcpListener::... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"3811"
] | 1.5 | a3bda62da36060a38638fba983a0c07c0ab6259d | diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/proto/h1/io.rs
+++ b/src/proto/h1/io.rs
@@ -205,7 +205,11 @@ where
return Poll::Ready(Err(crate::Error::new_too_large()));
}
if curr_len > 0 {
+ trace!("partial header... | Thanks for the sample code, I'll get this fixed today 🫡 | 2024-12-16T14:50:50Z | 3,812 | Intermittent panic in is_complete_fast
**Version**
1.5.1
**Platform**
`Darwin ghost.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64`
**Description**
Hyper client can panic when processing broken up 1xx HTTP1 responses.
When a server r... | hyperium__hyper-3812 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -2041,6 +2041,63 @@ mod conn {
assert_eq!(vec, b"bar=foo");
}
+ #[tokio::test]
+ async fn client_100_then_http09() {
+ let (server, addr) = setup_std_test_server();
+
+ thread::spawn(move ||... | hyperium/hyper | a3bda62da36060a38638fba983a0c07c0ab6259d |
[
"3790"
] | 1.5 | eaf2267cdc148604469fb09da22646f31710107a | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -279,7 +279,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
- toolchain: nightly-2024-05-01 # Compatible version for cargo-check-... | 2024-11-28T16:18:04Z | 3,799 | Make client tests work without server feature
Running `cargo test --features http1,http2,client` fails to compile because it uses some types only available when the `server` feature is also enabled. Fixing this would just require adding or adjusting `#[cfg(feature = ...)]` attributes, paying attention to the compiler e... | hyperium__hyper-3799 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -195,7 +195,7 @@ jobs:
- name: Run FFI unit tests
env:
RUSTFLAGS: --cfg hyper_unstable_ffi
- run: cargo test --features server,client,http1,http2,ffi --lib
... | hyperium/hyper | a3bda62da36060a38638fba983a0c07c0ab6259d | |
[
"3786"
] | 1.5 | 3b7375a16f23fb9a0975304ba6616af9323f3f13 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -23,6 +23,7 @@ jobs:
- features
- ffi
- ffi-header
+ - ffi-cargo-c
- doc
- check-external-types
- udeps
diff --git a/Cargo.toml b/Cargo.toml
--... | For what it's worth I've been happy with cargo-c and the upstream maintainers have been very helpful. In rustls-ffi I'm moving towards replacing the old `Makefile` approach (as linked to from the current curl docs) and instead recommending cargo-c as the blessed path for building the library (static or dynamic).
I've i... | 2024-11-19T21:40:38Z | 3,787 | cargo-c integration and dynamic linking
**Is your feature request related to a problem? Please describe.**
I'm trying to get the FFI interface of hyper up to speed with rustls-ffi, for integration in an operating system.
Compare the current [curl hyper documentation](https://github.com/curl/curl/blob/cb2ae6e8a8614a... | hyperium__hyper-3787 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -226,6 +227,31 @@ jobs:
- name: Ensure that hyper.h is up to date
run: ./capi/gen_header.sh --verify
+ ffi-cargo-c:
+ name: Test cargo-c support (FFI)
+ needs: [styl... | hyperium/hyper | a3bda62da36060a38638fba983a0c07c0ab6259d |
[
"3720"
] | 1.4 | 4c4de90a7e2aa0629b9c167a482399e28ccb0975 | diff --git a/benches/server.rs b/benches/server.rs
--- a/benches/server.rs
+++ b/benches/server.rs
@@ -72,7 +72,7 @@ macro_rules! bench_server {
tcp.write_all(b"GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n")
.unwrap();
let mut buf = Vec::new();
- t... | Thanks for the report! I could have sworn we did this, but then tweaked the test and you're right, not done. PR is up at #3725.
Thank you @seanmonstar!
Reopened this until the PR #3725 gets merged. | 2024-08-02T20:50:20Z | 3,725 | No `Connection: close` on HTTP1 Connection Drain
When HTTP1 connection draining is activated, the Connection: close header is not attached to responses sent to active connections. This prevents active clients from realizing that the server is requesting that the connection be closed and prevents graceful draining of HT... | hyperium__hyper-3725 | diff --git a/benches/pipeline.rs b/benches/pipeline.rs
--- a/benches/pipeline.rs
+++ b/benches/pipeline.rs
@@ -76,7 +76,7 @@ fn hello_world_16(b: &mut test::Bencher) {
tcp.write_all(b"GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n")
.unwrap();
let mut buf = Vec::new();
- ... | hyperium/hyper | 4c4de90a7e2aa0629b9c167a482399e28ccb0975 |
[
"3673"
] | 1.3 | aa7ff605da3b706e855f9633b8dddeb9463217d4 | diff --git a/src/client/conn/http1.rs b/src/client/conn/http1.rs
--- a/src/client/conn/http1.rs
+++ b/src/client/conn/http1.rs
@@ -12,7 +12,7 @@ use futures_util::ready;
use http::{Request, Response};
use httparse::ParserConfig;
-use super::super::dispatch;
+use super::super::dispatch::{self, TrySendError};
use cr... | i found the error msg from the drop func,just as follow
if Envelope still has req, it means req never send ,should it has the chance to retry?
struct Envelope<T, U>(Option<(T, Callback<T, U>)>);
impl<T, U> Drop for Envelope<T, U> {
fn drop(&mut self) {
if let Some((val, cb)) = self.0.take() {
... | 2024-06-21T20:09:56Z | 3,691 | hyper client happens cacel error which should retry
**Version**
List the version(s) of `hyper`, and any relevant hyper dependency (such as `h2` if this is related to HTTP/2).
hyper = { version = "1.1.0", features = ["full"] }
hyper-util = { version = "0.1.3", features = ["full"] }
**Platform**
The output of `una... | hyperium__hyper-3691 | diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs
--- a/src/client/dispatch.rs
+++ b/src/client/dispatch.rs
@@ -13,10 +13,21 @@ use tokio::sync::{mpsc, oneshot};
#[cfg(feature = "http2")]
use crate::{body::Incoming, proto::h2::client::ResponseFutMap};
-#[cfg(test)]
-pub(crate) type RetryPromise<T, U> = o... | hyperium/hyper | aa7ff605da3b706e855f9633b8dddeb9463217d4 |
[
"2703"
] | 1.3 | 721785efad8537513e48d900a85c05ce79483018 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -11,6 +11,7 @@ use bytes::{Buf, Bytes};
use futures_util::ready;
use http::header::{HeaderValue, CONNECTION, TE};
use http::{HeaderMap, Method, Version};
+use http_body::Frame;
use httparse::ParserConfi... | 2024-04-17T00:18:10Z | 3,637 | Receiving HTTP/1.1 trailers
| hyperium__hyper-3637 | diff --git a/src/body/incoming.rs b/src/body/incoming.rs
--- a/src/body/incoming.rs
+++ b/src/body/incoming.rs
@@ -403,6 +403,19 @@ impl Sender {
.map_err(|err| err.into_inner().expect("just sent Ok"))
}
+ #[cfg(feature = "http1")]
+ pub(crate) fn try_send_trailers(
+ &mut self,
+ ... | hyperium/hyper | aa7ff605da3b706e855f9633b8dddeb9463217d4 | |
[
"3615",
"3615"
] | 1.2 | bc9a86f58f8bd5c35b2bfd7e632ec132280d79ba | diff --git a/src/server/conn/http1.rs b/src/server/conn/http1.rs
--- a/src/server/conn/http1.rs
+++ b/src/server/conn/http1.rs
@@ -482,7 +482,11 @@ where
/// This `Connection` should continue to be polled until shutdown
/// can finish.
pub fn graceful_shutdown(mut self: Pin<&mut Self>) {
- Pin::ne... | 2024-03-30T11:42:44Z | 3,616 | Panic on graceful shutdown for http/1
**Version**
Encountered with `1.x`
**Platform**
Doesn't matter
**Description**
Attempt to call `graceful_shutdown` for H1 connection which is upgraded (=> `Poll::Ready`) leads to panic:
```
panic was raised: panicked at /usr/local/cargo/registry/src/index.crates.io-6f1... | hyperium__hyper-3616 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1256,6 +1256,67 @@ async fn disable_keep_alive_post_request() {
child.join().unwrap();
}
+#[tokio::test]
+async fn http1_graceful_shutdown_after_upgrade() {
+ let (listener, addr) = setup_tcp_listener();
+ let (... | hyperium/hyper | bc9a86f58f8bd5c35b2bfd7e632ec132280d79ba | |
[
"3477"
] | 1.1 | a9fa893f18c6409abae2e1dcbba0f4487df54d4f | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,6 +41,8 @@ want = { version = "0.3", optional = true }
[dev-dependencies]
form_urlencoded = "1"
+futures-channel = { version = "0.3", features = ["sink"] }
+futures-util = { version = "0.3", default-features = false, features = ["sink"] }... | Can I take this one? | 2024-01-08T16:38:08Z | 3,517 | Re-enable end-to-end request chunks benchmarks
The request chunks benchmarks were disabled as part of the upgrade to v1.0. It should now be easier to re-enable them.
- Update the [code](https://github.com/hyperium/hyper/blob/d3cfb9e0b1928701cfdd96c9551c4bd81c24e83a/benches/end_to_end.rs#L347-L358) to use an async `m... | hyperium__hyper-3517 | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -140,7 +140,6 @@ fn http2_parallel_x10_req_10mb(b: &mut test::Bencher) {
}
#[bench]
-#[ignore]
fn http2_parallel_x10_req_10kb_100_chunks(b: &mut test::Bencher) {
let body = &[b'x'; 1024 * 10];... | hyperium/hyper | a9fa893f18c6409abae2e1dcbba0f4487df54d4f |
[
"2719"
] | 0.3 | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -8,7 +8,7 @@ use std::time::Duration;
use crate::rt::{Read, Write};
use bytes::{Buf, Bytes};
-use http::header::{HeaderValue, CONNECTION};
+use http::header::{HeaderValue, CONNECTION, TE};
use http::{H... | @Xuanwo I've updated the issue above to include a list of things I think that needs to be done. If anything is missing, we can add more instructions here! | 2023-10-26T10:31:05Z | 3,375 | Sending HTTP/1.1 trailers
Here's a list of pieces needed to make this work:
- Update [`proto::h1::Dispatcher::poll_write()`](https://github.com/hyperium/hyper/blob/f1b89c117cffebed4b2b8eb2d221fd9b25c1d3d1/src/proto/h1/dispatch.rs#L365) so that when all data items are done (is `None`), check the body for trails `poll... | hyperium__hyper-3375 | diff --git a/src/proto/h1/encode.rs b/src/proto/h1/encode.rs
--- a/src/proto/h1/encode.rs
+++ b/src/proto/h1/encode.rs
@@ -327,7 +439,16 @@ impl std::error::Error for NotEof {}
#[cfg(test)]
mod tests {
+ use std::iter::FromIterator;
+
use bytes::BufMut;
+ use http::{
+ header::{
+ AUTHO... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2844"
] | 0.3 | 0891c9e3084453f4ff239c5059f3dddcbe25f1fb | diff --git a/src/error.rs b/src/error.rs
--- a/src/error.rs
+++ b/src/error.rs
@@ -8,6 +8,18 @@ pub type Result<T> = std::result::Result<T, Error>;
type Cause = Box<dyn StdError + Send + Sync>;
/// Represents errors that can occur handling HTTP streams.
+///
+/// # Formatting
+///
+/// The `Display` implementation ... | I filed a proposal for the working group: https://github.com/rust-lang/project-error-handling/issues/53 | 2023-09-11T20:09:02Z | 3,312 | Figure out hyper::Error Display including source chain
The current `Display` output of `Error` [doesn't match what many people think it should](https://github.com/hyperium/hyper/blob/master/docs/ROADMAP.md#errors), namely that it prints the error chain. We need to either:
- Change `hyper::Error` to not print the sou... | hyperium__hyper-3312 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -2318,10 +2318,6 @@ mod conn {
let error = client.send_request(req).await.unwrap_err();
assert!(error.is_user());
- assert_eq!(
- error.to_string(),
- "dispatch task is gone: us... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2872"
] | 0.3 | a45d5d5a04369f93334fc893875d8d1a49054e04 | diff --git a/src/body/incoming.rs b/src/body/incoming.rs
--- a/src/body/incoming.rs
+++ b/src/body/incoming.rs
@@ -201,7 +201,16 @@ impl Body for Incoming {
ping.record_data(bytes.len());
return Poll::Ready(Some(Ok(Frame::data(bytes))));
... | Yea, I think we've talked about this in a previous issue, but don't remember where. `h2` is making the "error" (the reset) trump any other frames that have been received. It should likely be changed to return all other received frames, and *then* return the error.
But _somewhere_ in the stack it should probably just su... | 2023-07-23T01:01:36Z | 3,275 | Client: handle `RST_STREAM` with `NO_ERROR` set for the reason
**Version**
```
hyper = "0.14.18"
h2 = "0.3.13"
```
**Platform**
```
> uname -a
Linux <REDACTED> 5.17.5-76051705-generic #202204271406~1651504840~22.04~63e51bd SMP PREEMPT Mon May 2 15: x86_64 x86_64 x86_64 GNU/Linux
```
**Description**
I've ... | hyperium__hyper-3275 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -1338,7 +1338,7 @@ mod conn {
use bytes::{Buf, Bytes};
use futures_channel::{mpsc, oneshot};
use futures_util::future::{self, poll_fn, FutureExt, TryFutureExt};
- use http_body_util::{BodyExt, Empty, StreamBo... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2872"
] | 0.14 | d77c2599bc023b258b90a17f5b633c8b7b0cbd4b | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -323,7 +323,12 @@ impl Body {
ping.record_data(bytes.len());
Poll::Ready(Some(Ok(bytes)))
}
- Some(Err(e)) => Poll::Ready(Some(Err(crate::Error::new... | Yea, I think we've talked about this in a previous issue, but don't remember where. `h2` is making the "error" (the reset) trump any other frames that have been received. It should likely be changed to return all other received frames, and *then* return the error.
But _somewhere_ in the stack it should probably just su... | 2023-07-23T01:01:19Z | 3,274 | Client: handle `RST_STREAM` with `NO_ERROR` set for the reason
**Version**
```
hyper = "0.14.18"
h2 = "0.3.13"
```
**Platform**
```
> uname -a
Linux <REDACTED> 5.17.5-76051705-generic #202204271406~1651504840~22.04~63e51bd SMP PREEMPT Mon May 2 15: x86_64 x86_64 x86_64 GNU/Linux
```
**Description**
I've ... | hyperium__hyper-3274 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -3154,6 +3154,61 @@ mod conn {
.expect("client should be open");
}
+ #[tokio::test]
+ async fn http2_responds_before_consuming_request_body() {
+ // Test that a early-response from server works... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2730"
] | 0.3 | d92d3917d950e4c61c37c2170f3ce273d2a0f7d1 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -175,6 +175,13 @@ where
}
}
+ #[cfg(feature = "server")]
+ pub(crate) fn has_initial_read_write_state(&self) -> bool {
+ matches!(self.state.reading, Reading::Init)
+ ... | Yea, I think this is behavior is currently on purpose. Whether it _should_ be is a fair question. I think at the time, I assumed that a _new_ connection would usually have a request incoming ASAP, whereas an idle connection might not, and so it was better to allow that request to come in.
We could alter that behavio... | 2023-07-06T18:47:14Z | 3,261 | Connection::graceful_shutdown always waits for the first request.
**Version**
hyper 0.14.16
**Platform**
Linux DESKTOP-DHO88R7 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
**Description**
If you gracefully shut down a server connection future before the first r... | hyperium__hyper-3261 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -31,6 +31,7 @@ use hyper::body::{Body, Incoming as IncomingBody};
use hyper::server::conn::{http1, http2};
use hyper::service::{service_fn, Service};
use hyper::{Method, Request, Response, StatusCode, Uri, Version};
+use to... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3253"
] | 0.14 | 297dc4c8ea2dbc844d030418f79a6869fd67f496 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -602,17 +602,16 @@ impl Sender {
}
/// Aborts the body in an abnormal fashion.
- pub fn abort(self) {
+ pub fn abort(mut self) {
+ self.send_error(crate::Error::new_body_write_aborted());
+ }
+
... | I've been playing around with the demo on my own machine, and even without the timeout, I see what you're describing. When I turn on tracing, I see that the connection task encounters a _write_ error, because the socket is closed, and then that closes up the task.
I would guess that it depends on what exact option t... | 2023-06-19T18:36:20Z | 3,257 | Missing error when reading stream of data out of an interrupted chunked-encoded request
**Version**
hyper 0.14.26
tokio 1.28.1
**Platform**
```Linux my-hostname 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux```
**Description**
Error is not propagated via stream in some cases when c... | hyperium__hyper-3257 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -62,7 +62,7 @@ tokio = { version = "1", features = [
] }
tokio-test = "0.4"
tokio-util = { version = "0.7", features = ["codec"] }
-tower = { version = "0.4", features = ["make", "util"] }
+tower = { version = "0.4", default-features = false, ... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"3252"
] | 0.3 | aa330bcba0ac0cb30868181ac870947604b9ecbf | diff --git a/src/proto/h1/dispatch.rs b/src/proto/h1/dispatch.rs
--- a/src/proto/h1/dispatch.rs
+++ b/src/proto/h1/dispatch.rs
@@ -366,7 +366,12 @@ where
self.conn.end_body()?;
}
} else {
- return Poll::Pending;
+ // If... | Oh, interesting. This is _supposed_ to work, and we have a matrix of `response_body_lengths` tests for a bunch of combinations (headers existing, body type knows it's own length, etc), and I noticed this specific combination wasn't included (chunked header set, known empty). Adding it, and the test does indeed hang. I'... | 2023-06-16T17:01:17Z | 3,254 | Chunked HTTP/1.1 doesn't send the last zero-chunk when body is empty
**Version**
hyper 0.14.26, h2 0.3.19, http 0.2.9
**Platform**
Linux 5.15, Ubuntu 22.04
**Description**
In HTTP/1.1, when `transfer-encoding: chunked` is set, all the data should be sent at a format of chunk. However, in hyper, if the body par... | hyperium__hyper-3254 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -92,6 +92,7 @@ mod response_body_lengths {
}
fn run_test(case: TestCase) {
+ let _ = pretty_env_logger::try_init();
assert!(
case.version == 0 || case.version == 1,
"TestCa... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3110"
] | 0.3 | f4b513009d81083081d1c60c1981847bbb17dd5d | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -315,7 +314,8 @@ impl Opts {
let mut client = rt.block_on(async {
if self.http2 {
- let io = tokio::net::TcpStream::connect(&addr).await.unwrap();
+ ... | cc @Noah-Kennedy @erickt @dhobsd
I am a fan of this if a proper trait could be found and the tokio experience has short-cuts such that the difference in experience with this change is minimal. But since that will go in util I don't see why hyper core it self shouldn't be based on its own io types.
I think you want to g... | 2023-05-17T21:38:21Z | 3,230 | hyper should use its own IO traits
This was actually brought up as [an unresolved question in the ROADMAP](https://github.com/hyperium/hyper/blob/master/docs/ROADMAP.md#should-there-be-hyperio-traits). I think I mentally dismissed it at some point as just being annoying, but in the past week as I've thought about how w... | hyperium__hyper-3230 | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -4,8 +4,7 @@
extern crate test;
mod support;
-// TODO: Reimplement Opts::bench using hyper::server::conn and hyper::client::conn
-// (instead of Server and HttpClient).
+// TODO: Reimplement paralle... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3178"
] | 1.3 | f9aa697ec371d36c6d553c988d84b6f709e63362 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -1,10 +1,12 @@
use std::fmt;
+#[cfg(feature = "server")]
+use std::future::Future;
use std::io;
use std::marker::{PhantomData, Unpin};
use std::pin::Pin;
use std::task::{Context, Poll};
#[cfg(feature ... | Hm, I see that in #2675, it originally started the timer immediately, but it was suggested it should wait because some clients make connections eagerly. While there may be clients that do that, it does seem like the timer should probably start right away anyways. The servers resources are more constrained than a client... | 2023-03-24T19:15:51Z | 3,185 | timeout while waiting for headers
There doesn't seem a way to specify, on a server, after a client connection has been accepted, a read timeout so as to close the client connection after a while when no client headers have been sent at all. See for instance the [ReadTimeout](https://blog.cloudflare.com/exposing-go-on-t... | hyperium__hyper-3185 | diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/proto/h1/io.rs
+++ b/src/proto/h1/io.rs
@@ -660,10 +630,8 @@ enum WriteStrategy {
#[cfg(test)]
mod tests {
- use crate::common::io::Compat;
- use crate::common::time::Time;
-
use super::*;
+ use crate::common::io::Compat;
use std::tim... | hyperium/hyper | aa7ff605da3b706e855f9633b8dddeb9463217d4 |
[
"2925"
] | 0.3 | 9feb70e9249d9fb99634ec96f83566e6bb3b3128 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -24,6 +24,7 @@ jobs:
- ffi
- ffi-header
- doc
+ - check-external-types
steps:
- run: exit 0
diff --git /dev/null b/.github/workflows/external-types.to... | Looks like that has been refactored into [cargo-check-external-types](https://github.com/awslabs/smithy-rs/tree/main/tools/cargo-check-external-types). I'll pick up this up.
I ran this tool against the master branch (982e6a51385). Any objections to these types being exposed and added to the allowlist, @seanmonstar? The... | 2023-02-28T22:51:48Z | 3,152 | Set up CI to audit for public dependency types
We want strict control over what types from dependencies we expose, and there is a tool that can help us check that in CI: [cargo api-linter](https://github.com/awslabs/smithy-rs/tree/main/tools/api-linter).
We should start by adding a new CI job to `.github/workflows/C... | hyperium__hyper-3152 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -210,3 +211,26 @@ jobs:
- name: cargo doc
run: cargo rustdoc --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
+
+ check-external-type... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3128"
] | 0.3 | 5bf16402f7a146417a9f997387401f9dc5a7d63d | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -316,11 +316,10 @@ impl Opts {
let mut client = rt.block_on(async {
if self.http2 {
let io = tokio::net::TcpStream::connect(&addr).await.unwrap();
- ... | Good catch, thank you! | 2023-01-30T19:09:16Z | 3,135 | `http2::handshake()` is useless in 1.0 given no default executor
**Version**
hyper 1.0.0-rc2
**Description**
`hyper::client::conn::http2::handshake(io).await` causes an instant panic. Internally it performs `Builder::new().handshake(io).await` which uses the `Exec::Default` executor. There is no longer a defau... | hyperium__hyper-3135 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -1922,8 +1922,7 @@ mod conn {
});
let io = tcp_connect(&addr).await.expect("tcp connect");
- let (mut client, conn) = conn::http2::Builder::new()
- .executor(TokioExecutor)
+ let (m... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3027"
] | 0.3 | d977f209bc6068d8f878b22803fc42d90c887fcc | diff --git a/benches/support/tokiort.rs b/benches/support/tokiort.rs
--- a/benches/support/tokiort.rs
+++ b/benches/support/tokiort.rs
@@ -41,6 +41,12 @@ impl Timer for TokioTimer {
inner: tokio::time::sleep_until(deadline.into()),
})
}
+
+ fn reset(&self, sleep: &mut Pin<Box<dyn Sleep>>, ... | Sigh, yea, I forgot about this. And Rust still hasn't made this any easier; we can't just say `trait Sleep: Any`. So, let's see, I think these are the options:
- Copy the methods from `Any` into `Sleep`, which allows checking `type_id` and then calling `downcast_mut`. To make it safe, it probably needs to implement th... | 2023-01-23T17:54:48Z | 3,125 | Timer::reset can't soundly have an optimized implementation
In 1.0.0-rc.1, the new `Timer` trait has a method to reset an existing `Sleep` to a new deadline. The default implementation simply creates a new `Sleep` and writes it over the old one, but presumably this method exists to it can be overridden with a better im... | hyperium__hyper-3125 | diff --git a/benches/support/tokiort.rs b/benches/support/tokiort.rs
--- a/benches/support/tokiort.rs
+++ b/benches/support/tokiort.rs
@@ -75,7 +81,10 @@ impl Future for TokioSleep {
}
}
-// Use HasSleep to get tokio::time::Sleep to implement Unpin.
-// see https://docs.rs/tokio/latest/tokio/time/struct.Sleep.h... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3079"
] | 0.14 | 0368a41a6cc1a5c6f1eada0d88e38b7dce261587 | diff --git a/src/server/conn.rs b/src/server/conn.rs
--- a/src/server/conn.rs
+++ b/src/server/conn.rs
@@ -58,6 +58,11 @@ use crate::error::{Kind, Parse};
#[cfg(feature = "http1")]
use crate::upgrade::Upgraded;
+#[cfg(all(feature = "backports", feature = "http1"))]
+pub mod http1;
+#[cfg(all(feature = "backports", ... | 2022-12-27T22:14:51Z | 3,102 | Backport the split server conn modules
In 1.0, we've split hyper::server::conn::Connection into per-version types. To ease upgrading (see https://github.com/hyperium/hyper/issues/3052), we can backport the addition of the two modules, hyper::server::conn::{http1, http2}. With them in place, we could then add a deprecat... | hyperium__hyper-3102 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -2641,6 +2641,144 @@ async fn http2_keep_alive_count_server_pings() {
.expect("timed out waiting for pings");
}
+// Tests for backported 1.0 APIs
+mod backports {
+ use super::*;
+ use hyper::server::conn::{h... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"3085"
] | 0.3 | 984760f76aaf5f0e20dddd119cad8188ca81e0e4 | diff --git a/examples/http_proxy.rs b/examples/http_proxy.rs
--- a/examples/http_proxy.rs
+++ b/examples/http_proxy.rs
@@ -31,8 +31,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
tokio::task::spawn(async move {
if let Err(err) = http1::Builder::new()
- .http1_pre... | Leaving for comments for a few days.
👍 Would it make sense to rename the builders `Http1Builder`, etc?
So, `http1::Http1Builder`? Seems contrary [RFC 356](http://rust-lang.github.io/rfcs/0356-no-module-prefixes.html). Users who want it can rename it on import: `use hyper::client::conn::http1::Builder as Http1Builder`.... | 2022-12-24T18:42:06Z | 3,101 | Remove version-specific prefixes from builder methods
With the split of the builders into per-version kinds (see #2842 and #2851), I feel there's a new question around whether we should remove the prefixes from the method names. They used to exist because the builders were combined over multiple HTTP versions, so the o... | hyperium__hyper-3101 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -1197,7 +1197,7 @@ test! {
client:
options: {
- http1_title_case_headers: true,
+ title_case_headers: true,
},
request: {
method: GET,
diff --git a/tests/cli... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3038"
] | 0.14 | 9ad4055fbfc899391f54ecbfc63de385cae711ef | diff --git a/src/server/tcp.rs b/src/server/tcp.rs
--- a/src/server/tcp.rs
+++ b/src/server/tcp.rs
@@ -43,24 +43,62 @@ impl TcpKeepaliveConfig {
}
}
- #[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "solaris")))]
+ #[cfg(any(
+ target_os = "android",
+ target_os... | I am also getting this error, had to downgrade it to v0.14.20 since my project would not build with v0.14.21
```
hyper = { version = "=0.14.20", features = ["full"] }
```
Looks like it needs a more complex blob of cfgs:
```rust
#[cfg(all(
feature = "all",
any(
target_os = "android",... | 2022-10-31T16:47:16Z | 3,039 | v0.14.21 broken build
**Version**
v0.14.21
**Platform**
MacOS and Linux
**Description**
Cannot build the newest hyper:
```
[2022-10-31T14:18:27.529Z] error[E0599]: no method named `with_interval` found for struct `TcpKeepalive` in the current scope
[2022-10-31T14:18:27.529Z] --> /root/.cargo/registry/sr... | hyperium__hyper-3039 | diff --git a/src/server/tcp.rs b/src/server/tcp.rs
--- a/src/server/tcp.rs
+++ b/src/server/tcp.rs
@@ -401,7 +439,17 @@ mod tests {
}
}
- #[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "solaris")))]
+ #[cfg(any(
+ target_os = "android",
+ target_os = "dragonfly... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"3028"
] | 0.3 | 54eaf7fb1377dbb60c1b7a1f1e93388a58acd466 | diff --git a/benches/support/tokiort.rs b/benches/support/tokiort.rs
--- a/benches/support/tokiort.rs
+++ b/benches/support/tokiort.rs
@@ -8,6 +8,7 @@ use std::{
use futures_util::Future;
use hyper::rt::{Sleep, Timer};
+use pin_project_lite::pin_project;
#[derive(Clone)]
/// An Executor that uses the tokio runt... | 2022-10-29T21:08:44Z | 3,037 | `Timer` methods should return `Pin<Box<dyn Sleep>>` and `Sleep` should drop the `Unpin` requirement
Otherwise, you need to double-box `!Unpin` timer futures like Tokio's.
| hyperium__hyper-3037 | diff --git a/benches/support/tokiort.rs b/benches/support/tokiort.rs
--- a/benches/support/tokiort.rs
+++ b/benches/support/tokiort.rs
@@ -59,15 +60,18 @@ where
// Use TokioSleep to get tokio::time::Sleep to implement Unpin.
// see https://docs.rs/tokio/latest/tokio/time/struct.Sleep.html
-pub(crate) struct TokioSl... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2649"
] | 0.3 | 81e25fa868c86e4ea81d5a96fdca497a4b1ab3c1 | diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs
--- a/src/client/dispatch.rs
+++ b/src/client/dispatch.rs
@@ -90,7 +90,7 @@ impl<T, U> Sender<T, U> {
}
let (tx, rx) = oneshot::channel();
self.inner
- .send(Envelope(Some((val, Callback::Retry(tx)))))
+ .send(... | Yea, we can do better. We probably can't completely remove the panic, since the `Canceled` error is part of the oneshot contract. But we can improve two the existing cases that _can_ happen, to try to eliminate it so that panic never _can_ happen.
- The runtime is dropped, killing the dispatch task.
- The dispatch ... | 2022-10-28T19:07:59Z | 3,032 | Consider removing "dispatch dropped without returning error"
**Is your feature request related to a problem? Please describe.**
Hyper panics with "dispatch dropped without returning error" if the background dispatch task goes away, either because the runtime was dropped or some user-provided code such as a HttpBody im... | hyperium__hyper-3032 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -2267,6 +2267,48 @@ mod conn {
done_tx.send(()).unwrap();
}
+ #[tokio::test]
+ async fn test_body_panics() {
+ let _ = pretty_env_logger::try_init();
+
+ let listener = TkTcpListener::bind(S... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2971"
] | 0.3 | 0888623d3764e887706d4e38f82f0fb57c50bd1a | diff --git a/examples/echo.rs b/examples/echo.rs
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -4,15 +4,16 @@ use std::net::SocketAddr;
use bytes::Bytes;
use http_body_util::{combinators::BoxBody, BodyExt, Empty, Full};
-use hyper::body::Body as _;
use hyper::server::conn::http1;
use hyper::service::service_fn... | Pinging because you may have opinions about the name: @hawkw @LucioFranco @davidpdrsn.
Node.js uses IncomingMessage. Making the connection to Body clearer though would be good. Perhaps IncomingBody?
Assuming that the user would never construct these themselves then I like `IncomingBody`.
ReqBody?
It's the body of a Req... | 2022-10-25T19:20:26Z | 3,022 | Determine name for `Recv` body type
We temporarily renamed the old `hyper::Body` struct to `hyper::body::Recv` in #2966. That was to unblock #2839, since we wanted to use the name for the trait instead. But, the name should be properly considered.
The purpose of this type is: an implementation of `Body` to represent... | hyperium__hyper-3022 | diff --git a/examples/web_api.rs b/examples/web_api.rs
--- a/examples/web_api.rs
+++ b/examples/web_api.rs
@@ -77,7 +77,7 @@ async fn api_get_response() -> Result<Response<BoxBody>> {
Ok(res)
}
-async fn response_examples(req: Request<Recv>) -> Result<Response<BoxBody>> {
+async fn response_examples(req: Reques... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"3010"
] | 0.3 | 91e83b7e486da956439df4439b32ad9e9977cbb2 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,8 +27,8 @@ futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
http = "0.2"
-http-body = { git = "https://github.com/hyperium/http-body", rev = "... | 2022-10-24T18:15:45Z | 3,020 | Update to use new http-body trait
With #2840 completed, we need to update hyper to use the new trait.
| hyperium__hyper-3020 | diff --git a/benches/body.rs b/benches/body.rs
--- a/benches/body.rs
+++ b/benches/body.rs
@@ -6,7 +6,8 @@ extern crate test;
use bytes::Buf;
use futures_util::stream;
use futures_util::StreamExt;
-use http_body_util::StreamBody;
+use http_body::Frame;
+use http_body_util::{BodyExt, StreamBody};
macro_rules! benc... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"3012"
] | 0.3 | fc4d3356cb7f2fffff5af9c474fa34c5adc5d6f1 | diff --git a/benches/pipeline.rs b/benches/pipeline.rs
--- a/benches/pipeline.rs
+++ b/benches/pipeline.rs
@@ -14,7 +14,7 @@ use http_body_util::Full;
use tokio::net::TcpListener;
use tokio::sync::oneshot;
-use hyper::server::conn::Http;
+use hyper::server::conn::http1;
use hyper::service::service_fn;
use hyper::... | 2022-10-14T20:45:05Z | 3,013 | Remove the combined-version server Connection type
With #2851 complete, we now have separate types for HTTP/1 and HTTP/2 server connections. We'll remove the combo `server::conn::{Http, Connection}` stuff for 1.0. A combined/auto type can live in `hyper-util`.
| hyperium__hyper-3013 | diff --git a/benches/pipeline.rs b/benches/pipeline.rs
--- a/benches/pipeline.rs
+++ b/benches/pipeline.rs
@@ -41,7 +41,7 @@ fn hello_world_16(b: &mut test::Bencher) {
loop {
let (stream, _addr) = listener.accept().await.expect("accept");
- Http::new()
+ ... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2960"
] | 0.3 | 9cc5e62f706b39c988167c6d04b8cf4389ab1603 | diff --git a/examples/client.rs b/examples/client.rs
--- a/examples/client.rs
+++ b/examples/client.rs
@@ -41,7 +41,7 @@ async fn fetch_url(url: hyper::Uri) -> Result<()> {
let addr = format!("{}:{}", host, port);
let stream = TcpStream::connect(addr).await?;
- let (mut sender, conn) = hyper::client::con... | `ffi::client` is also effected.
How would you like me to handle that?
Ohhh, I had forgotten about that. I guess a pared-down enum could be used in `ffi::client`. I can do that if it seems hairy, let me know. | 2022-09-20T00:06:01Z | 2,987 | Remove the client::conn combined-version types
The public client API for 1.0 will be the version-specific types at `client::conn::{http1, http2}`. The combined version may exist in `hyper-util`, but at least it should be removed from hyper proper. Doing so isn't particularly complex, but it will mean fixing up all the ... | hyperium__hyper-2987 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -232,19 +232,17 @@ macro_rules! test {
// Wrapper around hyper::client::conn::Builder with set_host field to mimic
// hyper::client::Builder.
struct Builder {
- inner: hype... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2857"
] | 0.3 | fee7d361c28c7eb42ef6bbfae0db14028d24bfee | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -54,6 +54,7 @@ serde_json = "1.0"
tokio = { version = "1", features = [
"fs",
"macros",
+ "net",
"io-std",
"io-util",
"rt",
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -79,7 +80,6 @@ full... | This is blocked on the timer related issues (like #2848) being done first.
With a `Timer` added, we can now delete all `cfg(feature = "runtime")` stuff from hyper. | 2022-09-03T12:38:20Z | 2,975 | Remove the `runtime` cargo feature
With the removal of the [`tcp` feature](#2856) and the addition of the [`Timer`](https://github.com/hyperium/hyper/issues/2846) trait, we no longer have need of the `runtime` feature.
| hyperium__hyper-2975 | diff --git a/src/client/mod.rs b/src/client/mod.rs
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -7,7 +7,7 @@
//! For a small example program simply fetching a URL, take a look at the
//! [full client example](https://github.com/hyperium/hyper/blob/master/examples/client.rs).
-#[cfg(all(test, feature = "runtim... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2848"
] | 0.3 | 2988baa309f726a588d818e6708f8bd38f9d9ce9 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -96,7 +96,6 @@ server = []
runtime = [
"tokio/net",
"tokio/rt",
- "tokio/time",
]
# C-API support (currently unstable (no semver))
diff --git /dev/null b/benches/support/mod.rs
new file mode 100644
--- /dev/null
+++ b/benches/su... | I'll look to take on the timer series of issues (#2847, #2846, #2848, #2857). | 2022-08-31T22:49:43Z | 2,974 | Use a generic Timer to implement the timeouts and intervals
After adding a [generic `T: Timer`](https://github.com/hyperium/hyper/issues/2847), update the uses of `tokio::time` to use the generic timer instead.
- [ ] HTTP/2 keep-alive interval
- [ ] HTTP/2 keep-alive timeout
- [ ] HTTP/1 read headers timeout
| hyperium__hyper-2974 | diff --git /dev/null b/benches/support/tokiort.rs
new file mode 100644
--- /dev/null
+++ b/benches/support/tokiort.rs
@@ -0,0 +1,66 @@
+#![allow(dead_code)]
+//! Various runtimes for hyper
+use std::{
+ pin::Pin,
+ task::{Context, Poll},
+ time::{Duration, Instant},
+};
+
+use futures_util::Future;
+use hyper:... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2962"
] | 0.3 | 7a41da5f601f59632d8c1514a75af720ed43413e | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -61,7 +61,7 @@ enum Kind {
/// [`Body::channel()`]: struct.Body.html#method.channel
/// [`Sender::abort()`]: struct.Sender.html#method.abort
#[must_use = "Sender does nothing unless sent on"]
-pub struct Sender {
+pub(c... | I'll get started on this. | 2022-08-29T17:44:54Z | 2,970 | Make `body::Sender` type and `Body::channel()` constructor private.
This is an "easy" task, in that the changes aren't *complicated*:
- Change the `hyper::body::Sender` type to `pub(crate)`.
- Change the `Body::channel()` method to `pub(crate)`.
- Replace any usage in the examples, tests, or docs with an appropria... | hyperium__hyper-2970 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -1325,6 +1325,7 @@ test! {
}
mod conn {
+ use std::error::Error;
use std::io::{self, Read, Write};
use std::net::{SocketAddr, TcpListener};
use std::pin::Pin;
diff --git a/tests/client.rs b/tests/client.r... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2839"
] | 0.3 | d963e6a9504575116f63df2485d8480fdb9b6f0b | diff --git a/examples/client.rs b/examples/client.rs
--- a/examples/client.rs
+++ b/examples/client.rs
@@ -4,7 +4,7 @@ use std::env;
use bytes::Bytes;
use http_body_util::Empty;
-use hyper::{body::HttpBody as _, Request};
+use hyper::{body::Body as _, Request};
use tokio::io::{self, AsyncWriteExt as _};
use tokio... | What would be the advantage in case of import both trait and struct?
The struct will be removed, as detailed in #2345.
I am just starting up with Hyper so would like to work on this task (if that's ok). By renaming and exporting the `http_body::Body` trait as just `Body`, I assume you are talking about updating the fol... | 2022-08-28T14:30:00Z | 2,969 | Rename the HttpBody export to Body
When the concrete `Body` struct is removed, we can export the `http_body::Body` trait as just `Body`.
| hyperium__hyper-2969 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -386,7 +386,7 @@ mod tests {
use std::mem;
use std::task::Poll;
- use super::{DecodedLength, HttpBody, Recv, Sender, SizeHint};
+ use super::{Body, DecodedLength, Recv, Sender, SizeHint};
#[test]
... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2922"
] | 0.3 | 952756b916eff4fc9482f7d38c6fb606614c2c12 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -181,11 +181,6 @@ name = "state"
path = "examples/state.rs"
required-features = ["full"]
-[[example]]
-name = "tower_server"
-path = "examples/tower_server.rs"
-required-features = ["full"]
-
[[example]]
name = "upgrades"
path = "examples/... | It was noted that the FFI body type makes use of `Body::empty()`. I think there's 2 ways we can fix that:
1. Add a `pub(crate) fn ffi() -> Body` that just starts the type like this: https://github.com/hyperium/hyper/blob/509672aada0af68a91d963e69828c6e31c44cb7b/src/body/body.rs#L240
2. Or, keep an `Empty` variant. ... | 2022-08-24T00:25:01Z | 2,958 | Remove Body's `Once` variant
| hyperium__hyper-2958 | diff --git a/benches/pipeline.rs b/benches/pipeline.rs
--- a/benches/pipeline.rs
+++ b/benches/pipeline.rs
@@ -3,17 +3,20 @@
extern crate test;
+use std::convert::Infallible;
use std::io::{Read, Write};
use std::net::{SocketAddr, TcpStream};
use std::sync::mpsc;
use std::time::Duration;
+use bytes::Bytes;
+u... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2948"
] | 0.3 | bb3af17ce1a3841e9170adabcce595c7c8743ea7 | diff --git a/src/client/connect/http.rs /dev/null
--- a/src/client/connect/http.rs
+++ /dev/null
@@ -1,252 +0,0 @@
-use std::error::Error as StdError;
-use std::fmt;
-use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
-use std::sync::Arc;
-use std::time::Duration;
-
-//#[cfg(feature = "runtime")] use super::dns::T... | 2022-08-17T00:51:26Z | 2,949 | Remove client connect module
| hyperium__hyper-2949 | diff --git a/src/client/connect/dns.rs /dev/null
--- a/src/client/connect/dns.rs
+++ /dev/null
@@ -1,239 +0,0 @@
-//! DNS Resolution used by the `HttpConnector`.
-//!
-//! This module contains:
-//!
-//! - A [`GaiResolver`](GaiResolver) that is the default resolver for the
-//! `HttpConnector`.
-//! - The `Name` type... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2841"
] | 0.3 | 889fa2d87252108eb7668b8bf034ffcc30985117 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -10,8 +10,6 @@ use http_body::{Body as HttpBody, SizeHint};
use super::DecodedLength;
use crate::common::Future;
-#[cfg(all(feature = "client", any(feature = "http1", feature = "http2")))]
-use crate::common::Never;
u... | 2022-08-13T00:19:51Z | 2,941 | Remove high-level pooling Client
The `hyper::Client` and support modules `hyper::client::connect` should be removed from hyper, and parts should reappear in hyper-util.
- [x] #2860
- [x] #2859
| hyperium__hyper-2941 | diff --git a/src/client/client.rs /dev/null
--- a/src/client/client.rs
+++ /dev/null
@@ -1,1356 +0,0 @@
-use std::error::Error as StdError;
-use std::fmt;
-use std::mem;
-use std::time::Duration;
-
-use futures_channel::oneshot;
-use futures_util::future::{self, Either, FutureExt as _, TryFutureExt as _};
-use http::he... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2849"
] | 0.3 | 491b076bca945ad9b62d49d0c14a4b989cb0106c | diff --git a/src/common/exec.rs b/src/common/exec.rs
--- a/src/common/exec.rs
+++ b/src/common/exec.rs
@@ -3,28 +3,17 @@ use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
-#[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
-use crate::body::Body;
#[cfg(feature = "server")]
us... | 2022-07-29T23:41:48Z | 2,932 | Remove hyper::Server
Remove the `hyper::Server` and `Builder` types, and `Accept` trait from hyper. It's possible we can move something similar to hyper-util, but [the `Accept` trait needs some reworking](https://github.com/hyperium/hyper/blob/master/docs/ROADMAP.md#higher-level-client-and-server-problems).
| hyperium__hyper-2932 | diff --git a/src/common/drain.rs /dev/null
--- a/src/common/drain.rs
+++ /dev/null
@@ -1,217 +0,0 @@
-use std::mem;
-
-use pin_project_lite::pin_project;
-use tokio::sync::watch;
-
-use super::{task, Future, Pin, Poll};
-
-pub(crate) fn channel() -> (Signal, Watch) {
- let (tx, rx) = watch::channel(());
- (Signal... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2856"
] | 0.3 | d4b5bd4ee6af0ae8924cf05ab799cc3e19a3c62d | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -94,12 +94,6 @@ server = []
# Tokio support
runtime = [
- "tcp",
- "tokio/rt",
- "tokio/time",
-]
-tcp = [
- "socket2",
"tokio/net",
"tokio/rt",
"tokio/time",
diff --git a/examples/client.rs b/examples/client.rs
---... | 2022-07-28T20:21:55Z | 2,929 | Remove the `tcp` cargo feature
Remove the `tcp` cargo feature, and related `tokio::net::TcpStream` integration (`TcpStream::connect` and `TcpListener`) (since we are already removing `client::connect` and `server::accept`).
| hyperium__hyper-2929 | diff --git a/benches/connect.rs b/benches/connect.rs
--- a/benches/connect.rs
+++ b/benches/connect.rs
@@ -3,35 +3,38 @@
extern crate test;
-use http::Uri;
-use hyper::client::connect::HttpConnector;
-use hyper::service::Service;
-use std::net::SocketAddr;
-use tokio::net::TcpListener;
+// TODO: Reimplement http_c... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2835"
] | 0.14 | faf24c6ad8eee1c3d5ccc9a4d4835717b8e2903f | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -10,6 +8,8 @@ use bytes::BytesMut;
use http::header::ValueIter;
use http::header::{self, Entry, HeaderName, HeaderValue};
use http::{HeaderMap, Method, StatusCode, Version};
+#[cfg(all(feature = "server"... | 2022-05-18T13:35:31Z | 2,836 | Server incorrectly adds content-length: 0 to Http1 Head responses
**Version**
0.14.18
**Platform**
```
Darwin C02DN4K3MD6R 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64 i386 MacBookPro16,1 Darwin
```
**Description**
Hyper incorrectly sets `con... | hyperium__hyper-2836 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -1,8 +1,6 @@
use std::fmt::{self, Write};
use std::mem::MaybeUninit;
-#[cfg(all(feature = "server", feature = "runtime"))]
-use tokio::time::Instant;
#[cfg(any(test, feature = "server", feature = "ffi"... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2649"
] | 0.14 | 287d712483aec6671427438d60ed2a72f856fd9f | diff --git a/src/client/dispatch.rs b/src/client/dispatch.rs
--- a/src/client/dispatch.rs
+++ b/src/client/dispatch.rs
@@ -86,7 +86,7 @@ impl<T, U> Sender<T, U> {
}
let (tx, rx) = oneshot::channel();
self.inner
- .send(Envelope(Some((val, Callback::Retry(tx)))))
+ .send(... | Yea, we can do better. We probably can't completely remove the panic, since the `Canceled` error is part of the oneshot contract. But we can improve two the existing cases that _can_ happen, to try to eliminate it so that panic never _can_ happen.
- The runtime is dropped, killing the dispatch task.
- The dispatch ... | 2022-03-21T14:23:11Z | 2,790 | Consider removing "dispatch dropped without returning error"
**Is your feature request related to a problem? Please describe.**
Hyper panics with "dispatch dropped without returning error" if the background dispatch task goes away, either because the runtime was dropped or some user-provided code such as a HttpBody im... | hyperium__hyper-2790 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -3114,6 +3114,44 @@ mod conn {
done_tx.send(()).unwrap();
}
+ #[tokio::test]
+ async fn test_body_panics() {
+ use hyper::body::HttpBody;
+
+ let _ = pretty_env_logger::try_init();
+
+ ... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2712"
] | 0.14 | ce8242571fc4dd6db8ccaad76eadab80ac009d32 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -204,9 +204,14 @@ impl Body {
#[cfg(all(feature = "http2", any(feature = "client", feature = "server")))]
pub(crate) fn h2(
recv: h2::RecvStream,
- content_length: DecodedLength,
+ mut cont... | Whether the body size can be corrected based on is_end_stream to determine whether the request is empty.
```
/// Returns true if the receive half has reached the end of stream.
///
/// A return value of `true` means that calls to `poll` and `poll_trailers`
/// will both return `None`.
pub fn... | 2021-12-06T18:44:07Z | 2,715 | body size
If a request without a body does not carry content-length or chunk, the size_hint method of the body can obtain the correct value in the HTTP1 scenario but cannot obtain the correct value in the H2 scenario.
```
fn size_hint(&self) -> SizeHint {
match self.kind {
Kind::Once(Som... | hyperium__hyper-2715 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -361,6 +361,26 @@ mod response_body_lengths {
assert_eq!(res.headers().get("content-length").unwrap(), "10");
assert_eq!(res.body().size_hint().exact(), Some(10));
}
+
+ #[tokio::test]
+ async fn h... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2701"
] | 0.14 | 1010614a0de032b43306ef9dc6da5a3e8ebf7a09 | diff --git a/src/error.rs b/src/error.rs
--- a/src/error.rs
+++ b/src/error.rs
@@ -71,6 +71,7 @@ pub(super) enum Parse {
#[cfg(feature = "http1")]
VersionH2,
Uri,
+ UriTooLong,
Header(Header),
TooLarge,
Status,
diff --git a/src/error.rs b/src/error.rs
--- a/src/error.rs
+++ b/src/error.... | Good catch! We could add a check for the length just before calling `Uri::from_shared`, and if too long, return a `Parse` error. An integration test in `tests/server.rs` would be good too. | 2021-11-23T03:58:28Z | 2,706 | When the URL contains more than 65534 characters, the error code returned by Hyper is not 414.
The length of the from_shared method of the third-party library http::Uri is verified, The maximum length is (u16::MAX - 1).
| hyperium__hyper-2706 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1025,6 +1025,23 @@ fn http_10_request_receives_http_10_response() {
assert_eq!(s(&buf[..expected.len()]), expected);
}
+#[test]
+fn http_11_uri_too_long() {
+ let server = serve();
+
+ let long_path = "a".repeat... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2676"
] | 0.14 | b5022f3854d1f9ed3e76233dd63f319efc3b8f47 | diff --git a/src/client/client.rs b/src/client/client.rs
--- a/src/client/client.rs
+++ b/src/client/client.rs
@@ -1022,6 +1022,23 @@ impl Builder {
self
}
+ /// Set whether HTTP/1 connections should try to use vectored writes,
+ /// or always flatten into a single buffer.
+ ///
+ /// Note t... | 2021-10-27T12:13:00Z | 2,677 | Provide a way to force the queue write strategy, again
Once upon a time, there was [a way](https://github.com/hyperium/hyper/issues/2282) to force Hyper to use the queue write strategy.
This functionality was then [removed](https://github.com/hyperium/hyper/pull/2338) from Hyper 0.14.0.
Unfortunately, the heurist... | hyperium__hyper-2677 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -71,7 +71,6 @@ where
self.io.set_flush_pipeline(enabled);
}
- #[cfg(test)]
pub(crate) fn set_write_strategy_queue(&mut self) {
self.io.set_write_strategy_queue();
}
dif... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2457",
"2661"
] | 0.14 | d0b1d9ed3a10013ab356bc7d9b283e179857a672 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -100,6 +100,7 @@ stream = []
runtime = [
"tcp",
"tokio/rt",
+ "tokio/time",
]
tcp = [
"socket2",
diff --git a/src/error.rs b/src/error.rs
--- a/src/error.rs
+++ b/src/error.rs
@@ -44,6 +44,9 @@ pub(super) enum Kind {
#[c... | 2021-10-26T09:05:32Z | 2,675 | Defends against slow HTTP attacks.
I think hyper needs to add capabilities such as client_header_timeout and client_body_timeout to defend against slow attacks.
The Nginx defense method is as follows:
https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/#client_header_timeout
feat(h1): add h... | hyperium__hyper-2675 | diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/proto/h1/io.rs
+++ b/src/proto/h1/io.rs
@@ -693,6 +726,9 @@ mod tests {
cached_headers: &mut None,
req_method: &mut None,
h1_parser_config: Default::default(),
+ h1_header_read_timeout: None,... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2643"
] | 0.14 | e3ab409808a6aa06ebacaaa936cb926785913d24 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -461,7 +466,7 @@ where
}
}
match self.state.writing {
- Writing::Init => true,
+ Writing::Init => self.io.can_headers_buf(),
_ => false,
... | Thanks for the report, yep, definitely a bug! I'll take a look-see.
Huh, so I set up an example just as you did, but with hyper as the server, and instead of a panic, I see an IO error since the hyper server closed the connection after writing the 200 OK. I'm guessing actix does something a little different, and that's... | 2021-09-14T23:23:02Z | 2,646 | Panic via reqwest when sending large body in debug mode
**Version**
hyper-0.14.12
reqwest-0.11.4 (blocking)
**Platform**
Manjaro Linux x86_64
**Description**
When sending large requests **repeatedly too fast**, a panic happens in debug mode.
I tried this code in debug mode:
```
fn main() {
let client ... | hyperium__hyper-2646 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -71,6 +71,11 @@ where
self.io.set_flush_pipeline(enabled);
}
+ #[cfg(test)]
+ pub(crate) fn set_write_strategy_queue(&mut self) {
+ self.io.set_write_strategy_queue();
+ }
+
... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2575"
] | 0.14 | 08b2138e4036c5ae3e4c6f5c85763d45fb869922 | diff --git a/capi/include/hyper.h b/capi/include/hyper.h
--- a/capi/include/hyper.h
+++ b/capi/include/hyper.h
@@ -371,6 +371,17 @@ void hyper_clientconn_options_exec(struct hyper_clientconn_options *opts,
*/
enum hyper_code hyper_clientconn_options_http2(struct hyper_clientconn_options *opts, int enabled);
+/*
+ ... | 2021-06-11T21:13:44Z | 2,576 | C API: Provide a way to get the raw response header bytes
What if... the C API provided an option to ask for the original header data, as a single unaltered buffer? It'd be cheap in hyper, just a ref count bump on that buffer, and in curl you wouldn't need to re-stitch together the headers into lines, or have a discrep... | hyperium__hyper-2576 | diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/proto/h1/io.rs
+++ b/src/proto/h1/io.rs
@@ -675,6 +677,8 @@ mod tests {
h1_parser_config: Default::default(),
preserve_header_case: false,
h09_responses: false,
+ #[cfg(feature = "ffi")]
+ ... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2532"
] | 0.14 | 684f2fa76d44fa2b1b063ad0443a1b0d16dfad0e | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -115,17 +111,23 @@ impl Http1Transaction for Server {
// but we *never* read any of it until after httparse has assigned
// values into it. By not zeroing out the stack memory, this saves
... | Good call!
Refactored the code. | 2021-05-11T12:01:41Z | 2,545 | Replace usage of `mem::uninitialized` with `MaybeUninit`
When the following comment was added in #1845, hyper's minimum supported rust version was `1.27.0`
https://github.com/hyperium/hyper/blob/4e9a006498c7bdb5bb2ccb76a4c877f6da7e23b2/src/proto/h1/role.rs#L1-L3
which I assume is why [`std::mem::MaybeUninit`](htt... | hyperium__hyper-2545 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -1,9 +1,5 @@
-// `mem::uninitialized` replaced with `mem::MaybeUninit`,
-// can't upgrade yet
-#![allow(deprecated)]
-
use std::fmt::{self, Write};
-use std::mem;
+use std::mem::{self, MaybeUninit};
#[c... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2508"
] | 0.14 | be9677a1e782d33c4402772e0fc4ef0a4c49d507 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,7 +31,7 @@ http = "0.2"
http-body = "0.4"
httpdate = "1.0"
httparse = "1.4"
-h2 = { version = "0.3", optional = true }
+h2 = { version = "0.3.3", optional = true }
itoa = "0.4.1"
tracing = { version = "0.1", default-features = false, fea... | AFAICT for the client part we mostly want to patch this match arm:
https://github.com/hyperium/hyper/blob/117cc492a62c4051c75e7eec0f624b30db8a20e5/src/proto/h2/client.rs#L217-L290
Specifically, ultimately we want to patch this snippet so that it inserts an `OnUpgrade` extension in the returned response, with its ... | 2021-04-28T09:22:09Z | 2,523 | Support CONNECT over h2
There is [a h2 issue](https://github.com/hyperium/h2/issues/234) but even if support for CONNECT was perfect in h2, there are still details to sort out on hyper itself too. I'm filing this issue because I started working on that today and will probably need some help.
| hyperium__hyper-2523 | diff --git a/src/body/length.rs b/src/body/length.rs
--- a/src/body/length.rs
+++ b/src/body/length.rs
@@ -3,6 +3,17 @@ use std::fmt;
#[derive(Clone, Copy, PartialEq, Eq)]
pub(crate) struct DecodedLength(u64);
+#[cfg(any(feature = "http1", feature = "http2"))]
+impl From<Option<u64>> for DecodedLength {
+ fn fro... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2483"
] | 0.14 | c7ab1aace102688ca3ad1bba6b5a7c5fd93b21b6 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -147,10 +146,6 @@ jobs:
command: build
args: --features client,http1,http2,ffi
- # TODO: re-enable check once figuring out how to get it working in CI
- # -... | I was able to get past that issue by adding the following patch to capi/gen_header.sh
```patch
diff --git a/capi/gen_header.sh b/capi/gen_header.sh
index 4cd1a26c..27f2c4cf 100755
--- a/capi/gen_header.sh
+++ b/capi/gen_header.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+set -ex
+
CAPI_DIR="$( cd "$( dirnam... | 2021-04-01T17:30:18Z | 2,488 | Errors running gen_header.sh
I'm trying to fix some of the errors you get when you run the curl test suite with the Hyper backend. I tried to pick an easy one to start - Curl expects you to return CURLE_UNSUPPORTED_PROTOCOL when a server returns HTTP/1.2, but Hyper/c-hyper.c currently doesn't.
So I wanted to add an... | hyperium__hyper-2488 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -17,6 +17,7 @@ jobs:
- test
- features
- ffi
+ - ffi-header
- doc
steps:
- run: exit 0
diff --git a/.github/workflows/CI.yml b/.github/workflows/... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2482"
] | 0.14 | 98e7e0bd15642cf9e4bf07b3b03d8b4e538623ba | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -66,6 +66,8 @@ jobs:
- rust: nightly
features: "--features full,nightly"
benches: true
+ - rust: 1.46
+ features: "--features full"
... | Oh shucks. Probably need to revert that commit for now, unless socket2 can reduce it's dependent features, but I doubt it.
cc @Thomasdezeeuw
I'm afraid socket2's MSRV can't easily be lowered. Rust 1.46 was released August 27th, if that isn't old enough then I guess it needs to be reverted.
You could just pin socket2 ... | 2021-03-31T11:49:43Z | 2,486 | The update to socket2 v0.4 raised the MSRV to 1.46
CI didn't catch it because MSRV is tested only with default features.
```
$ cargo +1.45.2 c --features tcp
Checking socket2 v0.4.0
Checking tokio v1.4.0
error[E0658]: `match` is not allowed in a `const fn`
--> /.cargo/registry/src/github.com-1ecc6299db... | hyperium__hyper-2486 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -51,7 +51,7 @@ jobs:
- stable
- beta
- nightly
- - 1.45.2
+ - 1.46
os:
- ubuntu-latest
| hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2313"
] | 0.14 | 117cc492a62c4051c75e7eec0f624b30db8a20e5 | diff --git a/src/client/client.rs b/src/client/client.rs
--- a/src/client/client.rs
+++ b/src/client/client.rs
@@ -997,6 +997,17 @@ impl Builder {
self
}
+ /// Set whether HTTP/1 connections will write header names as provided
+ /// at the socket level.
+ ///
+ /// Note that this setting doe... | As always, I've suggest filing a bug with the thing that expects a certain casing, since in HTTP/1 header casing is defined as case-insensitive, and in HTTP2 and 3, it's forced to lowercase. So the Switch is definitely wrong here.
That said, I realize it's not always controllable, and so I'm exploring providing supp... | 2021-03-26T11:26:07Z | 2,480 | Option to preserve header's title case
I am building a HTTP proxy with hyper, and I realize that headers are all converted to lower case for HTTP/1.x.
There was an issue about adding `http1_title_case_headers` for clients: https://github.com/hyperium/hyper/issues/1492 , but we don't have a way to preserve the **resp... | hyperium__hyper-2480 | diff --git /dev/null b/src/ext.rs
new file mode 100644
--- /dev/null
+++ b/src/ext.rs
@@ -0,0 +1,64 @@
+//! HTTP extensions
+
+use bytes::Bytes;
+#[cfg(feature = "http1")]
+use http::header::{HeaderName, IntoHeaderName, ValueIter};
+use http::HeaderMap;
+
+/// A map from header names to their original casing as receive... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2468"
] | 0.14 | 41f99578a53845e5e0bb999c101bef8307e1ce5f | diff --git a/src/client/client.rs b/src/client/client.rs
--- a/src/client/client.rs
+++ b/src/client/client.rs
@@ -972,6 +972,14 @@ impl Builder {
self
}
+ /// Set whether HTTP/0.9 responses should be tolerated.
+ ///
+ /// Default is false.
+ pub fn http09_responses(&mut self, val: bool) ->... | 👀 This is the first time I've seen HTTP/0.9 support asked for. I would have assumed that since HTTP/1.0 came out (double checks) over 25 years ago, people would have moved on. Oh well.
If a client sends a request to a server that happens to not speak HTTP at all, what's the proposed way to notice that versus just a... | 2021-03-19T13:57:22Z | 2,473 | Support HTTP/0.9 responses in the client
There are servers out there that sometimes reply with HTTP/0.9 responses, even modern-ish stack (we saw such responses from MSFT servers for example).
I'm filing this here and not on the httparse repo because this is a substantial change worth discussing in the open, and beca... | hyperium__hyper-2473 | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,3 @@
-#![doc(html_root_url = "https://docs.rs/hyper/0.14.4")]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(test, deny(rust_2018_idioms))]
diff --git a/src/proto/h1/io.rs b/src/proto/h1/io.rs
--- a/src/prot... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2470"
] | 0.14 | eb0e7186963bbe4fa1ad4478ac493f75ddc92ae5 | diff --git a/src/headers.rs b/src/headers.rs
--- a/src/headers.rs
+++ b/src/headers.rs
@@ -42,26 +42,26 @@ pub(super) fn content_length_parse_all_values(values: ValueIter<'_, HeaderValue>
// be alright if they all contain the same value, and all parse
// correctly. If not, then it's an error.
- let folde... | I coulda sworn hyper supported this, and so dug a little. hyper _does_ correctly support if the multiple values are on multiple lines, but not if comma-separated. So, this works:
```
HTTP/1.1 200 OK
content-length: 3
content-length: 3
hey
```
But not `content-length: 3,3`. Seems like something to fix, and ... | 2021-03-17T21:17:40Z | 2,471 | Support multiple Content-Length values
Hi,
I try to work on some [failing tests](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/fetch/content-length/resources/content-lengths.json) of servo. To summarize the issue : the `fetch` specification has been recently updated to handle multiple value... | hyperium__hyper-2471 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -1043,6 +1043,30 @@ test! {
error: |err| err.to_string() == "request has unsupported HTTP version",
}
+test! {
+ name: client_handles_contentlength_values_on_same_line,
+
+ server:
+ expected: "GET /fo... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2421"
] | 0.14 | 48d4594930da4e227039cfa254411b85c98b63c5 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,7 +34,7 @@ httparse = "1.0"
h2 = { version = "0.3", optional = true }
itoa = "0.4.1"
tracing = { version = "0.1", default-features = false, features = ["std"] }
-pin-project-lite = "0.2.4"
+pin-project = "1.0"
tower-service = "0.3"
tokio... | This is interesting. Did it work fine for v0.14.2? What features do you have enabled?
@seanmonstar
Yes, it completed with v0.14.2, in this run: https://github.com/spruceid/didkit/runs/1842355682#step:6:434
Features are: `["server", "client", "http1", "stream"]`
Edit: I can reproduce the errors locally using thes... | 2021-02-05T23:41:20Z | 2,422 | Build failure with v0.14.3
Hi,
I get some build errors in CI with the newly released hyper v0.14.3:
In https://github.com/spruceid/didkit/runs/1842461977#step:6:437
```
error[E0433]: failed to resolve: could not find `h2` in `proto`
--> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.1... | hyperium__hyper-2422 | diff --git a/src/client/pool.rs b/src/client/pool.rs
--- a/src/client/pool.rs
+++ b/src/client/pool.rs
@@ -777,7 +776,7 @@ mod tests {
use std::time::Duration;
use super::{Connecting, Key, Pool, Poolable, Reservation, WeakOpt};
- use crate::common::{exec::Exec, task, Future, Pin};
+ use crate::common:... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2409"
] | 0.14 | 1928682b33f98244435ba6d574677546205a15ec | diff --git a/src/headers.rs b/src/headers.rs
--- a/src/headers.rs
+++ b/src/headers.rs
@@ -117,9 +117,9 @@ pub(super) fn add_chunked(mut entry: http::header::OccupiedEntry<'_, HeaderValue
// + 2 for ", "
let new_cap = line.as_bytes().len() + CHUNKED.len() + 2;
let mut buf = BytesMut::with_cap... | 2021-01-26T18:04:04Z | 2,410 | "Transfer-Encoding" correction code causes a panic
Repro code:
```rust
use hyper::server::Server;
use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Client, Request, Response};
use std::convert::Infallible;
#[tokio::main]
async fn main() {
let make_service = make_service_fn(|_conn| asyn... | hyperium__hyper-2410 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -401,6 +401,36 @@ test! {
body: None,
}
+test! {
+ name: client_transfer_encoding_repair,
+
+ server:
+ expected: "\
+ GET / HTTP/1.1\r\n\
+ transfer-encoding: foo, chunked\r\... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2390"
] | 0.14 | a15f3f7f0f536c74d51636bbc00f6b5ec110472b | diff --git a/src/client/conn.rs b/src/client/conn.rs
--- a/src/client/conn.rs
+++ b/src/client/conn.rs
@@ -272,7 +272,7 @@ where
ResponseFuture { inner }
}
- pub(crate) fn send_request_retryable(
+ pub(super) fn send_request_retryable(
&mut self,
req: Request<B>,
) -> impl F... | 2021-01-13T11:12:22Z | 2,400 | Lint for unreachable_pub
This is a good clean up to help detect any types or methods that seem public but aren't really. By adjusting their privacy, we can reduce accidentally making things public in case we later on made some module the re-exports them public.
To do this, start by adding `#![deny(unreachable_pub)]`... | hyperium__hyper-2400 | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,6 +2,7 @@
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(test, deny(rust_2018_idioms))]
+#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(all(test,... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2388"
] | 0.14 | 2c8121f1735aa8efeb0d5e4ef595363c373ba470 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,7 +34,7 @@ httparse = "1.0"
h2 = { version = "0.3", optional = true }
itoa = "0.4.1"
tracing = { version = "0.1", default-features = false, features = ["std"] }
-pin-project = "1.0"
+pin-project-lite = "0.2.4"
tower-service = "0.3"
tokio... | Considered, and agreed! It should be done!
This may require https://github.com/taiki-e/pin-project-lite/pull/43.
UPDATE: merged and released in pin-project-lite 0.2.4.
I'll take a stab at implementing this.
Depends on https://github.com/taiki-e/pin-project-lite/pull/25 because of https://github.com/hyperium/hype... | 2021-01-11T23:13:37Z | 2,393 | Switch from pin-project to pin-project-lite
futures-rs [just switched](https://github.com/rust-lang/futures-rs/pull/2273) and tokio has been using the `-lite` one since 0.2.0. I haven't used either so I don't actually know how hard switching is, but it seems like a good idea since it greatly improves compile times for ... | hyperium__hyper-2393 | diff --git a/src/client/mod.rs b/src/client/mod.rs
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -52,8 +52,7 @@
pub use self::connect::HttpConnector;
pub mod connect;
-#[cfg(test)]
-#[cfg(feature = "runtime")]
+#[cfg(all(test, feature = "runtime"))]
mod tests;
cfg_feature! {
diff --git a/src/client/pool.rs... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
[
"2260"
] | 0.14 | 257d6a99193c9404ce055727833e1490c23a7197 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -5,8 +5,6 @@ use std::fmt;
use bytes::Bytes;
use futures_channel::mpsc;
-#[cfg(any(feature = "http1", feature = "http2"))]
-#[cfg(feature = "client")]
use futures_channel::oneshot;
use futures_core::Stream; // for mp... | 2021-01-06T15:58:46Z | 2,387 | Add sending trailers on Body channel
The `Body::channel()` variant is a common simple way to send data as a `Body`. It would be useful to also be able to send trailers on it.
### Implementation
The code to change is on the `hyper::body::Sender`, and the relevant `Kind` variant. I could imagine two possible ways t... | hyperium__hyper-2387 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -628,7 +651,7 @@ mod tests {
assert_eq!(
mem::size_of::<Sender>(),
- mem::size_of::<usize>() * 4,
+ mem::size_of::<usize>() * 5,
"Sender"
);
| hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2376"
] | 0.14 | 3d6bdbe85006e623eae83d7c3ce9a45680d6c2c8 | diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs
--- a/src/client/connect/http.rs
+++ b/src/client/connect/http.rs
@@ -27,6 +27,7 @@ use super::{Connected, Connection};
///
/// Sets the [`HttpInfo`](HttpInfo) value on responses, which includes
/// transport information such as the remote socket a... | 2020-12-24T23:14:58Z | 2,377 | Connector implementation crates have to pick http1/http2
The low-level connection APIs like `Connected`/`Connection`/`HttpConnector` all require one of `http1` or `http2` to be set. This means that external crates like `hyper-openssl` have to pick one of those features to enable, which is kind of out of scope for what ... | hyperium__hyper-2377 | diff --git /dev/null b/src/client/client.rs
new file mode 100644
--- /dev/null
+++ b/src/client/client.rs
@@ -0,0 +1,1233 @@
+use std::error::Error as StdError;
+use std::fmt;
+use std::mem;
+use std::time::Duration;
+
+use futures_channel::oneshot;
+use futures_util::future::{self, Either, FutureExt as _, TryFutureExt... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2373"
] | 0.14 | c784a10174deb461b2eaa59ed9fabae5c315eb68 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -132,4 +132,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: rustdoc
- args: --features full -- -D broken-intra-doc-links
+ args: --features... | 2020-12-23T19:35:19Z | 2,372 | 0.14 docs failed to build
https://docs.rs/crate/hyper/0.14.0
| hyperium__hyper-2372 | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,6 +4,7 @@
#![cfg_attr(test, deny(rust_2018_idioms))]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(all(test, feature = "nightly"), feature(test))]
+#![cfg_attr(docsrs, feature(doc_cfg))]
//! # hyper
//!
| hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2352"
] | 0.3 | fad42acc79b54ce38adf99c58c894f29fa2665ad | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,75 @@
+## v0.14.0 (2020-12-23)
+
+
+#### Bug Fixes
+
+* **client:** log socket option errors instead of returning error (#2361) ([dad5c879](https://github.com/hyperium/hyper/commit/dad5c8792fec7b586b41b5237bc161d8f0c09f72), closes... | Here's an update on the exact release situation. This is based on the expectation that Tokio 1.0 will be released by EOY 2020. Considering that plan, I see 3 options:
1. Wait the 2 weeks for Tokio 1.0, and release hyper 0.14 at the same time (with Tokio 1.0 support).
2. Release hyper v0.14 right now, and then relea... | 2020-12-23T18:45:34Z | 2,371 | v0.14 Release Checklist
The [v0.14 milestone](https://github.com/hyperium/hyper/milestone/6) is complete, meaning all major features are merged. This is a checklist of some administrata to have a smooth release!
- [x] Release Tokio 1.0, and then upgrade hyper (https://github.com/hyperium/hyper/issues/2370)
- [x] Re... | hyperium__hyper-2371 | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc(html_root_url = "https://docs.rs/hyper/0.13.9")]
+#![doc(html_root_url = "https://docs.rs/hyper/0.14.0")]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(test, deny(rust_2018_idioms))]
| hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2370"
] | 0.3 | dad5c8792fec7b586b41b5237bc161d8f0c09f72 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,20 +22,20 @@ include = [
]
[dependencies]
-bytes = "0.6"
+bytes = "1"
futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
http = "0.2"
-http... | 2020-12-22T20:18:36Z | 2,369 | Upgrade to Tokio 1.0
It's not released yet, but will be *very* soon.
Relevant PRs:
- [x] http-body: https://github.com/hyperium/http-body/pull/31
- [x] h2: https://github.com/hyperium/h2/pull/504
- [x] hyper: https://github.com/hyperium/hyper/pull/2369
| hyperium__hyper-2369 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -62,8 +62,8 @@ tokio = { version = "0.3", features = [
"time",
"test-util",
] }
-tokio-test = "0.3"
-tokio-util = { version = "0.5", features = ["codec"] }
+tokio-test = "0.4"
+tokio-util = { version = "0.6", features = ["codec"] }
to... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f | |
[
"2171"
] | 0.13 | 42560c7c40d8f934658624114fda4eb819cefda8 | diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
--- a/src/proto/h1/decode.rs
+++ b/src/proto/h1/decode.rs
@@ -55,6 +55,8 @@ enum ChunkedState {
Body,
BodyCr,
BodyLf,
+ Trailer,
+ TrailerLf,
EndCr,
EndLf,
End,
diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
-... | That is actually valid chunked encoding, using chunked trailers. hyper just hasn't supported them, because practically _nothing_ has ever used them and they are annoying to deal with.
gRPC of HTTP/1.1 decided "oh hey, we can do trailers with this obscure detail of chunked encoding". Grumble.
Checking [RFC7230](https:/... | 2020-12-16T16:25:18Z | 2,363 | Decoding response from gRPC REST proxy results in "Invalid chunk end CR" error
I am integrating with a go application that uses the gRPC REST proxy to provide an HTTP API.
My HTTP client is `reqwest` which uses `hyper:0.13.3` at this stage.
The go application sends the following response:
```
HTTP/1.1 500 Inter... | hyperium__hyper-2363 | diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
--- a/src/proto/h1/decode.rs
+++ b/src/proto/h1/decode.rs
@@ -537,6 +561,15 @@ mod tests {
assert_eq!("1234567890abcdef", &result);
}
+ #[tokio::test]
+ async fn test_read_chunked_trailer_with_missing_lf() {
+ let mut mock_buf = &... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2171"
] | 0.3 | 7d9a5806e146798d0cbe67672bbe3ad5ae680393 | diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
--- a/src/proto/h1/decode.rs
+++ b/src/proto/h1/decode.rs
@@ -55,6 +55,8 @@ enum ChunkedState {
Body,
BodyCr,
BodyLf,
+ Trailer,
+ TrailerLf,
EndCr,
EndLf,
End,
diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
-... | That is actually valid chunked encoding, using chunked trailers. hyper just hasn't supported them, because practically _nothing_ has ever used them and they are annoying to deal with.
gRPC of HTTP/1.1 decided "oh hey, we can do trailers with this obscure detail of chunked encoding". Grumble.
Checking [RFC7230](https:/... | 2020-12-13T05:51:51Z | 2,357 | Decoding response from gRPC REST proxy results in "Invalid chunk end CR" error
I am integrating with a go application that uses the gRPC REST proxy to provide an HTTP API.
My HTTP client is `reqwest` which uses `hyper:0.13.3` at this stage.
The go application sends the following response:
```
HTTP/1.1 500 Inter... | hyperium__hyper-2357 | diff --git a/src/proto/h1/decode.rs b/src/proto/h1/decode.rs
--- a/src/proto/h1/decode.rs
+++ b/src/proto/h1/decode.rs
@@ -538,6 +562,15 @@ mod tests {
assert_eq!("1234567890abcdef", &result);
}
+ #[tokio::test]
+ async fn test_read_chunked_trailer_with_missing_lf() {
+ let mut mock_buf = &... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2347"
] | 0.3 | a470446deb2cb2c0e3700f67d9f70097d0d7d75f | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -68,7 +68,7 @@ tower-util = "0.3"
url = "1.0"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dev-dependencies]
-pnet = "0.25.0"
+pnet_datalink = "0.27.2"
[features]
# Nothing by default
| > **Fixed in**: >=0.26.0
> **Issue**: [pnet GitHub issue #449](https://github.com/libpnet/libpnet/issues/449)
This doesn't really seem to have been fixed yet. (https://github.com/libpnet/libpnet/pull/455)
> > **Fixed in**: >=0.26.0
>
> > **Issue**: [pnet GitHub issue #449](https://github.com/libpnet/libpnet/is... | 2020-11-27T21:36:22Z | 2,348 | Known vulnerability in dependency 'pnet' v 0.25.0
I ran `cargo audit` on the current master and got a match for a known vulnerability in pnet 0.25.0:
__ID__: RUSTSEC-2019-0037
__Package__: pnet
__Version__: 0.25.0
__Fixed in__: not yet fixed
__Title__: Compiler optimisation for next_with_timeout in pnet::transpo... | hyperium__hyper-2348 | diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs
--- a/src/client/connect/http.rs
+++ b/src/client/connect/http.rs
@@ -723,7 +723,7 @@ mod tests {
let mut ip_v4 = None;
let mut ip_v6 = None;
- let ips = pnet::datalink::interfaces()
+ let ips = pnet_datalink::interfa... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"1937"
] | 0.3 | a470446deb2cb2c0e3700f67d9f70097d0d7d75f | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -9,21 +9,21 @@
//! # Resolvers are `Service`s
//!
//! A resolver is just a
-//! `Service<Name, Response = impl Iterator<Item = IpAddr>>`.
+//! `Service<Name, Response = impl Iterator<... | Note: requires https://github.com/hyperium/http/pull/343 to work (patch in Cargo.toml)
Addressed the review comments, so this is ready for review again.
Uploaded as a separate commit, I can of course squash/rebase if desired.
I'm not up-to-speed on IPv6 zone IDs. It identifies a specific port? Or, why is this changi... | 2020-11-26T01:33:40Z | 2,346 | feat(client): allow connecting to IPv6 link-local addresses
| hyperium__hyper-2346 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -366,42 +366,42 @@ mod tests {
let v4_addr = (ip_v4, 80).into();
let v6_addr = (ip_v6, 80).into();
- let (mut preferred, mut fallback) = IpAddrs {
+ let... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2086"
] | 0.3 | 751c122589cfd9935e8e3239cd0d692e573784c5 | diff --git a/examples/http_proxy.rs b/examples/http_proxy.rs
--- a/examples/http_proxy.rs
+++ b/examples/http_proxy.rs
@@ -58,7 +58,7 @@ async fn proxy(client: HttpClient, req: Request<Body>) -> Result<Response<Body>,
// `on_upgrade` future.
if let Some(addr) = host_addr(req.uri()) {
toki... | Just my 2¢, and I don't know how you or others would feel about it, but at this early stage it should be fine IMO to just release a 0.14 with it changed to the way you believe it should be. I suspect that only a few of us users have gone far upgrading to 0.13 yet and and its just another version to bump in our Cargo.t... | 2020-11-19T22:30:09Z | 2,337 | Move HTTP upgrades API off the Body type
Introduced in https://github.com/hyperium/hyper/pull/1563, the HTTP Upgrade/`CONNECT` API currently is accessed via `hyper::Body::on_upgrade`. This has some downsides that I'd like to address with a modified API:
- It makes the `Body` type fatter.
- It requires people keep t... | hyperium__hyper-2337 | diff --git a/src/upgrade.rs b/src/upgrade.rs
--- a/src/upgrade.rs
+++ b/src/upgrade.rs
@@ -277,6 +280,38 @@ impl<T: AsyncRead + AsyncWrite + Unpin + 'static> Io for ForwardsWriteBuf<T> {
}
}
+mod sealed {
+ use super::OnUpgrade;
+
+ pub trait CanUpgrade {
+ fn on_upgrade(self) -> OnUpgrade;
+ }
... | hyperium/hyper | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
[
"2302"
] | 0.2 | cc7d3058e84b63d26697026f44cdc153b208de9a | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,4 @@
+
[package]
name = "hyper"
version = "0.14.0-dev" # don't forget to update html_root_url
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,12 +31,12 @@ http = "0.2"
http-body = "0.3.1"
httpdate = "0.3... | https://github.com/hyperium/h2/pull/491 is a PR for updating `h2`.
> [hyperium/h2#491](https://github.com/hyperium/h2/pull/491) is a PR for updating `h2`.
The PR just landed 🎉
As soon it is part of a new release we can proceed here 😄 | 2020-11-05T22:07:58Z | 2,319 | Upgrade to Tokio v0.3
Tokio v0.3 [just released](https://tokio.rs/blog/2020-10-tokio-0-3), we should upgrade as part of hyper v0.14.
Prerequisites:
- [x] Upgrade `h2` to Tokio v0.3
- [ ] Add back functionality to Tokio v0.3
- [x] Reintroduce `oneshot::Sender::poll_closed` https://github.com/tokio-rs/tokio/pul... | hyperium__hyper-2319 | diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -39,7 +39,7 @@ jobs:
- stable
- beta
- nightly
- - 1.39.0
+ - 1.45.2
os:
- ubuntu-latest
diff --git a/Cargo.toml b/Ca... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"2310"
] | 0.13 | fb19f3a86997af1c8a31a7d5ce6f2b018c9b5a0d | diff --git a/src/proto/h2/ping.rs b/src/proto/h2/ping.rs
--- a/src/proto/h2/ping.rs
+++ b/src/proto/h2/ping.rs
@@ -442,7 +442,16 @@ impl KeepAlive {
let interval = shared.last_read_at() + self.interval;
self.timer.reset(interval);
}
- KeepAliveState::Scheduled |... | Thanks for the nice write-up! It does seem like there's a bug in here. Would be good to get this fixed, probably writing a test for this might get trickier...
Hi @seanmonstar ,
Can you help me to see if I'm on the right track here?
To test the fix I suggested above, we could write a test like below.
Basically w... | 2020-10-29T15:13:29Z | 2,315 | Only one HTTP2 Ping is sent with keep alive enabled
I believe there is a bug in the HTTP2 keep alive implementation, more concretely in `src/proto/h2/ping.rs`.
This issue was originally detected in https://github.com/hyperium/tonic/issues/474, credits to @alce.
It seems that when enabling HTTP2 server keep alive,... | hyperium__hyper-2315 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1903,6 +1903,94 @@ async fn http2_keep_alive_with_responsive_client() {
client.send_request(req).await.expect("client.send_request");
}
+fn is_ping_frame(buf: &[u8]) -> bool {
+ buf[3] == 6
+}
+
+fn assert_ping_fra... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2263"
] | 0.13 | 3de81c822e6ac5a5b0640059f53838d0906f68c4 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -12,6 +12,7 @@ use super::{Decoder, Encode, EncodedBuf, Encoder, Http1Transaction, ParseContext
use crate::common::{task, Pin, Poll, Unpin};
use crate::headers::connection_keep_alive;
use crate::proto::{... | Currently the writing state just gets closed, [here](https://github.com/hyperium/hyper/blob/3de81c822e6ac5a5b0640059f53838d0906f68c4/src/proto/h1/conn.rs#L604). Instead, `end_body` should probably be changed to return a `crate::Result<()>`, and that case should return an error that will shutdown the connection. | 2020-08-10T23:08:55Z | 2,264 | Sending a streamed non-chunked request will hang when body sender is dropped early
When sending a streaming request (using `Body::channel`) without content-length, the request terminates when dropping the `Sender`. But when a content-length is set, dropping the `Sender` before all bytes are sent will result in a reques... | hyperium__hyper-2264 | diff --git a/src/proto/h1/encode.rs b/src/proto/h1/encode.rs
--- a/src/proto/h1/encode.rs
+++ b/src/proto/h1/encode.rs
@@ -405,7 +406,7 @@ mod tests {
assert_eq!(dst, b"foo bar");
assert!(!encoder.is_eof());
- encoder.end::<()>().unwrap_err();
+ encoder.end::<()>().unwrap();
... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2215"
] | 0.14 | f162ca2f2fd14681e11dd8b9ba8d1469b2b9271b | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -562,13 +562,13 @@ impl Http1Transaction for Server {
}
}
None | Some(BodyLength::Known(0)) => {
- if msg.head.subject != StatusCode... | 2020-06-03T09:57:53Z | 2,216 | Hyper should skip automatic Content-Length header for HTTP 1xx responses
Similar to issue #1797 hyper should not set a content-length header for a number of different scenario's. Quoting [RFC 7230, section 3.3.2](https://tools.ietf.org/html/rfc7230#section-3.3.2) 6th paragraph:
> A server MUST NOT send a Content-Le... | hyperium__hyper-2216 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1330,8 +1330,9 @@ async fn upgrades_new() {
let mut buf = [0; 256];
tcp.read(&mut buf).expect("read 1");
- let expected = "HTTP/1.1 101 Switching Protocols\r\n";
- assert_eq!(s(&buf[..expecte... | hyperium/hyper | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 | |
[
"2188"
] | 0.13 | 203621e3be6b0dab6b79d1914482c556075a19ff | diff --git a/src/body/mod.rs b/src/body/mod.rs
--- a/src/body/mod.rs
+++ b/src/body/mod.rs
@@ -22,17 +22,14 @@ pub use self::aggregate::aggregate;
pub use self::body::{Body, Sender};
pub use self::to_bytes::to_bytes;
-pub(crate) use self::payload::Payload;
-
mod aggregate;
mod body;
-mod payload;
mod to_bytes;
... | 2020-05-14T20:17:18Z | 2,202 | refactor: use HttpBody with extra bounds instead of Payload trait
I've done most of the legwork, but I'm confused about the interaction of the error types that the compiler is complaining about at this point. If someone else wants to take a look, that'd be great.
| hyperium__hyper-2202 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -258,7 +258,7 @@ mod response_body_lengths {
fn auto_response_with_unknown_length() {
run_test(TestCase {
version: 1,
- // no headers means trying to guess from Payload
+ // no ... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 | |
[
"2176"
] | 0.13 | e08a271eb93711f7209da98ab6261851f92da235 | diff --git a/examples/README.md b/examples/README.md
--- a/examples/README.md
+++ b/examples/README.md
@@ -39,7 +39,7 @@ pretty_env_logger = "0.4"
* [`params`](params.rs) - A webserver that accept a form, with a name and a number, checks the parameters are presents and validates the input.
-* [`send_file`](send_fi... | I think this is because futures-fs crate uses `Future`s and `Stream`s from [futures](https://crates.io/crates/futures) crate of version 0.1
But hyper 0.13 works with futures of version 0.3, these versions are incompatible.
There is a way to convert file into stream by [tokio-util](https://crates.io/crates/tokio-uti... | 2020-04-24T08:56:16Z | 2,193 | Serve a file through a readable stream
I want to send a file without putting the whole file in memory, for that i use futures-fs who creat a readable stream, but i cant give to a Hyper response, with the Body::wrap_stream function:
Code:
```rust
use hyper::service::{ make_service_fn, service_fn };
use hyper::{ Body... | hyperium__hyper-2193 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,6 +51,7 @@ serde_derive = "1.0"
serde_json = "1.0"
tokio = { version = "0.2.2", features = ["fs", "macros", "io-std", "rt-util", "sync", "time", "test-util"] }
tokio-test = "0.2"
+tokio-util = { version = "0.3", features = ["codec"] }
tow... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"838"
] | 0.13 | a354580e3f7f22dfebb872df0b9de67d0e1f1840 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -11,7 +11,7 @@ use futures_util::TryStreamExt;
use http::HeaderMap;
use http_body::{Body as HttpBody, SizeHint};
-use crate::common::{task, Future, Never, Pin, Poll};
+use crate::common::{task, watch, Future, Never, Pi... | > master - looks like this feature is forgotten.
Not so much forgotten, I just wanted to come up with a better design. What you outline here seems like it should work on master:
``` rust
fn on_request(&mut self, req: Request) -> Next {
match request.headers().get() {
Some(&ContentLength(len)) if len > 10... | 2020-01-27T23:30:38Z | 2,119 | Change 100-continue behavior to send when Body has been polled
Use of the 100 (Continue) Status (https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3):
> The purpose of the 100 (Continue) status (see section 10.1.1) is to allow a client that is sending a request message with a request body to determine if t... | hyperium__hyper-2119 | diff --git a/src/body/body.rs b/src/body/body.rs
--- a/src/body/body.rs
+++ b/src/body/body.rs
@@ -507,11 +525,29 @@ impl Sender {
}
}
+impl fmt::Debug for Sender {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ #[derive(Debug)]
+ struct Open;
+ #[derive(Debug)]
+ ... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2114"
] | 0.13 | ba2a144f8b81042247088215425f91760d8694a1 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -902,7 +902,6 @@ impl State {
}
fn prepare_upgrade(&mut self) -> crate::upgrade::OnUpgrade {
- debug_assert!(self.upgrade.is_none());
let (tx, rx) = crate::upgrade::pending();
... | Looks like a `debug_assert`, but I can't possibly remember why it's there... | 2020-01-24T00:27:24Z | 2,115 | 'assertion failed: self.upgrade.is_none()' when reusing connection with ignored upgrade header
Hyper threads panic (though the server remains running) when a client makes multiple requests with an upgrade header (which hyper ignores). The first request is handled without issue, but when the second request is made the h... | hyperium__hyper-2115 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1323,6 +1323,46 @@ async fn upgrades_new() {
assert_eq!(s(&vec), "bar=foo");
}
+#[tokio::test]
+async fn upgrades_ignored() {
+ let _ = pretty_env_logger::try_init();
+ let mut listener = tcp_bind(&"127.0.0.1:0"... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2067"
] | 0.13 | bfda3906170b3b7f184e586d18bdcfa2f7b8e941 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
http = "0.2"
-http-body = "0.3"
+http-body = "0.3.1"
httparse = "1.0"
h2 = "0.2.... | I think this makes sense but forces http to be async I guess unless we put it behind a feature flag. Otherwise, I think this could be a great addition.
How does it force http to be async? It'd only implement in the `http-body` crate.
Ah you're right, if the impl is in the http-body crate then I am +1 | 2019-12-13T18:20:56Z | 2,077 | Consider implementing HttpBody for Request and Response
In https://github.com/hyperium/http/issues/107, we didn't implement `Stream` for `http::{Request, Response}` so as to not have the external dependency. However, in `http-body`, since we define the trait and import `http`, we could provide this implementation.
I... | hyperium__hyper-2077 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -146,7 +146,7 @@ macro_rules! test {
);
)*
- let body = rt.block_on(concat(res.into_body()))
+ let body = rt.block_on(concat(res))
.expect("body concat wai... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"2058"
] | 0.13 | e12329054a6707d05bed342a249e1c75a932d52f | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -800,7 +800,7 @@ impl Client {
Ok(Some((DecodedLength::CHUNKED, false)))
} else {
trace!("not chunked, read till eof");
- Ok(Some((DecodedLength... | Yep, that line looks wrong indeed! | 2019-12-12T21:04:25Z | 2,075 | Transfer-Encoding: identity
I have a web service that returns its content with "Transfer-Encoding: identity". If I read the spec correctly that means that the content should not be touched and interpreted as it is.
Unfortunately hyper seems to assume that whenever transfer encoding is present in a response header it... | hyperium__hyper-2075 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -1441,7 +1441,7 @@ mod tests {
",
);
- // transfer-encoding
+ // transfer-encoding: chunked
assert_eq!(
parse(
"\
diff --git a/s... | hyperium/hyper | 42560c7c40d8f934658624114fda4eb819cefda8 |
[
"1931"
] | 0.2 | c56ccfb03366036dcc48d037e4c212d1f0fc7eb9 | diff --git a/examples/web_api.rs b/examples/web_api.rs
--- a/examples/web_api.rs
+++ b/examples/web_api.rs
@@ -3,7 +3,7 @@
use futures_util::{StreamExt, TryStreamExt};
use hyper::client::HttpConnector;
use hyper::service::{make_service_fn, service_fn};
-use hyper::{header, Body, Chunk, Client, Method, Request, Respo... | I'm a firm +1 to this suggestion. I'd also be okay with _maybe_ replacing `Bytes` usage with _just_ `Vec<u8>`, but I feel less strongly about the latter point.
I haven't checked if `BytesMut` is reused internally once all strong refs are gone. I assumed that was the major reason for using `Bytes` in the first place.
I ... | 2019-12-06T00:58:05Z | 2,048 | Remove Chunk in favor of using Bytes directly
Compared to `Bytes`, `Chunk` is pointless and kinda frustrating:
* It's a trivial wrapper around `Bytes` but `Bytes` is exposed via the `From`/`Into` impl anyways so it's not like it's keeping it out of the public API
* `Chunk` adds 0 new functionality over `Bytes`, all... | hyperium__hyper-2048 | diff --git a/src/body/chunk.rs /dev/null
--- a/src/body/chunk.rs
+++ /dev/null
@@ -1,175 +0,0 @@
-use std::fmt;
-
-use bytes::{Buf, Bytes};
-
-/// A piece of a message body.
-///
-/// These are returned by [`Body`](::Body). It is an efficient buffer type.
-///
-/// A `Chunk` can be easily created by many of Rust's stan... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1673"
] | 0.2 | edbd10ac96c5cc6dbeca80ada80f143dbd13d118 | diff --git a/src/client/pool.rs b/src/client/pool.rs
--- a/src/client/pool.rs
+++ b/src/client/pool.rs
@@ -2,11 +2,13 @@ use std::collections::{HashMap, HashSet, VecDeque};
use std::fmt;
use std::ops::{Deref, DerefMut};
use std::sync::{Arc, Mutex, Weak};
+
+#[cfg(not(feature = "runtime"))]
use std::time::{Duration,... | I'm noticing this more and more, since AppVeyor won't build any jobs in parallel, nor branches, so if a couple PRs appear, it can take a couple hours to get run (and even just a single PR will run 4 jobs at around ~6-7minutes each, for ~30mins total).
Previous attempt: https://github.com/hyperium/hyper/pull/1690
Appare... | 2019-12-05T01:55:47Z | 2,044 | Switch from Travis and AppVeyor to GitHub Actions
AppVeyor is quite slow, and the current script in hyper tests Windows nightly, which can mean Windows testing can be flaky. It'd be nice to move to Travis-CI's new Windows support, running the tests on the same matrix as AppVeyor, but probably sticking with just stable ... | hyperium__hyper-2044 | diff --git /dev/null b/.github/workflows/CI.yml
new file mode 100644
--- /dev/null
+++ b/.github/workflows/CI.yml
@@ -0,0 +1,76 @@
+name: CI
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+
+env:
+ RUST_BACKTRACE: 1
+
+jobs:
+ test:
+ name: Test ${{ matrix.rust }} on ${{ matrix.os }}
+
+ strategy... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"2034"
] | 0.2 | aa66de4f27748cad84efe8113744f607e7b6b79a | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -69,8 +70,8 @@ tcp = [
"tokio/time",
]
-# unstable features
-unstable-stream = []
+# `impl Stream` for things
+stream = []
# internal features used in CI
nightly = []
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.t... | To me, `Stream` seemed like a core trait, just like `Future`, so I was surprised when I had to switch it on in hyper.
I know that the reality around what’s core at the moment is a bit more complicated at the moment, but the above is just my initial reaction.
I would vote yes for `stream` as default, but perhaps ... | 2019-12-05T00:50:21Z | 2,042 | Rename `unstable-stream` feature to just `stream`
While hyper is pre-1.0, it's not really fair to say other pre-1.0 dependencies are unstable.
Should `stream` be enabled by default?
| hyperium__hyper-2042 | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,11 +5,11 @@ matrix:
fast_finish: true
include:
- rust: nightly
- env: FEATURES="--no-default-features --features runtime,unstable-stream,nightly"
+ env: FEATURES="--no-default-features --features runtim... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"2039"
] | 0.2 | 4d7a2266b88b2c5c92231bcd2bd75d5842198add | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
http = "0.2"
-http-body = "0.2"
+http-body = "0.3"
httparse = "1.0"
h2 = "0.2"
... | 2019-12-05T00:30:16Z | 2,040 | Update to http-body 0.3
| hyperium__hyper-2040 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,7 +49,7 @@ spmc = "0.3"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
-tokio = { version = "0.2.2", features = ["fs", "macros", "rt-util", "sync", "time", "test-util"] }
+tokio = { version = "0.2.2", features = ["fs", "macros", "io... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a | |
[
"2025"
] | 0.2 | 131962c86ab0a31c2413261cf4532eca88d67dcb | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,35 +20,28 @@ include = [
]
[dependencies]
-bytes = "0.4.6"
-futures-core = "0.3.1"
-futures-channel = "0.3.1"
-futures-util = "0.3.1"
-http = "0.1.15"
-http-body = "=0.2.0-alpha.3"
+bytes = "0.5"
+futures-core = { version = "0.3", default... | looks like the blocker is gone now? :)
The h2 change was just commited to the code repository and no new release uploaded to `crates.io`. :disappointed:
A follow up change is needed to `h2` to restore all behavior: https://github.com/hyperium/h2/pull/429
Please keep in mind that in the US it's Thanksgiving weekend,... | 2019-12-04T00:07:28Z | 2,030 | Update to tokio 0.2
- [ ] Blocked on `h2`: https://github.com/hyperium/h2/milestone/2
| hyperium__hyper-2030 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -56,9 +49,8 @@ spmc = "0.3"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
-tokio = "=0.2.0-alpha.6" # using #[tokio::test] attributes
-tokio-fs = "=0.2.0-alpha.6"
-tokio-test = "=0.2.0-alpha.6"
+tokio = { version = "0.2.2", features = ... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1984"
] | 0.2 | 19a7aab51f4b70ef1561ecd912c988d9ddfc7532 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -21,18 +21,16 @@
//! Ok::<_, Infallible>(iter::once(IpAddr::from([127, 0, 0, 1])))
//! });
//! ```
-use std::{fmt, io, vec};
use std::error::Error;
-use std::net::{
- IpAddr, ... | 2019-11-19T17:39:03Z | 2,019 | Rewrite HttpConnector internals with async/await
The internal code handling the `HttpConnector` is messy from manual future implementations. I believe it could be much cleaner if written with `async fn` and `await`.
| hyperium__hyper-2019 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -326,33 +334,49 @@ mod sealed {
}
}
+pub(crate) async fn resolve<R>(resolver: &mut R, name: Name) -> Result<R::Addrs, R::Error>
+where
+ R: Resolve,
+{
+ futures_util::futu... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a | |
[
"1903"
] | 0.2 | 039281b89cf1ab54a0ecc10c5e7fee56d4da0cf4 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -1,11 +1,26 @@
-//! The `Resolve` trait, support types, and some basic implementations.
+//! DNS Resolution used by the `HttpConnector`.
//!
//! This module contains:
//!
//! - A [`G... | Now that #1792 is closed, what do you have in mind by "basically an alias"? I assume this isn't referring to waiting for https://github.com/rust-lang/rust/issues/41517 , so what should `Resolve` become?
It'd be similar to `HttpService`, basically just bounds that mean `R: Service<Name, Response = impl Iterator<Item = I... | 2019-11-12T20:08:57Z | 2,011 | Change `Resolve` to alias `Service`
After #1782 is done, the `Resolve` trait should be changed to basically an alias for a `Service<Name>`. This would allow more composability, being able to use ServiceExt to customize resolvers.
| hyperium__hyper-2011 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -299,6 +279,41 @@ impl Future for TokioThreadpoolGaiFuture {
}
}
+mod sealed {
+ use tower_service::Service;
+ use crate::common::{Future, Poll, task};
+ use super::{IpA... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1843"
] | 0.2 | a1fe383c9d86a813fb2574cc1145ec654ee47e0d | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -151,7 +151,9 @@ where I: AsyncRead + AsyncWrite + Unpin,
self.state.version = msg.head.version;
if msg.decode == DecodedLength::ZERO {
- debug_assert!(!msg.expect_continue, "... | 2019-10-18T22:34:09Z | 1,983 | server debug panic on `Expect: 100-continue` without `Content-Length`
This is related to #1842 but seems distinct enough to warrant its own issue.
When doing Icecast streaming, the client typically sends an authorization header and an `Expect: 100-continue` to wait for authorization before trying to upload a stream.... | hyperium__hyper-1983 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -724,6 +724,28 @@ fn expect_continue_sends_100() {
assert_eq!(body, msg);
}
+#[test]
+fn expect_continue_but_no_body_is_ignored() {
+ let server = serve();
+ let mut req = connect(server.addr());
+ server.repl... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a | |
[
"1764"
] | 0.2 | 8e7ebd80cd81d3b1ad900debd150667812c8d8e3 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -38,7 +38,7 @@ where I: AsyncRead + AsyncWrite + Unpin,
Conn {
io: Buffered::new(io),
state: State {
- allow_half_close: true,
+ allow_half_c... | I can see the same behaviour with the latest Hyper v0.12.24 (tokio v0.1.15, tokio-io v0.1.11). The application works correctly when I put it behind nginx proxy.
Hm, sounds like it's looping here? https://github.com/hyperium/hyper/blob/877606d5c81195374259561aa98b973a00fa6056/src/proto/h1/io.rs#L215
Does the log mess... | 2019-10-18T20:14:19Z | 1,981 | 100% CPU usage on client disconnection when serving a streamed response
I ran into an issue when load testing my server application based on Hyper 0.12.23. The servers provides very long (video) streams to clients. The problem is that sometimes when a client disconnects, the server ends up in an infinite loop trying to... | hyperium__hyper-1981 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -945,6 +945,7 @@ fn disable_keep_alive_post_request() {
#[test]
fn empty_parse_eof_does_not_return_error() {
+ let _ = pretty_env_logger::try_init();
let mut rt = Runtime::new().unwrap();
let listener = tcp_bi... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1945"
] | 0.2 | dc54ee199f2d19d65913d224b900a61ab3bf2415 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,21 +27,21 @@ futures-util-preview = { version = "=0.3.0-alpha.18" }
http = "0.1.15"
http-body = "=0.2.0-alpha.1"
httparse = "1.0"
-h2 = "=0.2.0-alpha.1"
+h2 = "=0.2.0-alpha.2"
iovec = "0.1"
itoa = "0.4.1"
log = "0.4"
net2 = { version =... | h2 update: https://github.com/hyperium/h2/pull/409 | 2019-09-22T04:13:15Z | 1,947 | Update to tokio alpha 5
- [ ] update h2
- [ ] update hyper
| hyperium__hyper-1947 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -52,9 +52,9 @@ spmc = "0.3"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
-tokio = "=0.2.0-alpha.4" # using #[tokio::test] attributes
-tokio-fs = "=0.2.0-alpha.4"
-tokio-test = "=0.2.0-alpha.4"
+tokio = "=0.2.0-alpha.5" # using #[tokio... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1925"
] | 0.12 | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -781,31 +781,44 @@ impl Client {
impl Client {
fn set_length(head: &mut RequestHead, body: Option<BodyLength>) -> Encoder {
- if let Some(body) = body {
- let can_chunked = head.ve... | 2019-09-04T21:33:38Z | 1,926 | Client GET requests with transfer-encoding are wrongly stripped
The client wrongly strips `transfer-encoding: chunked` from GET requests, thinking that GET requests shouldn't have payloads. However, [that's not explicitly true](https://tools.ietf.org/html/rfc7231#section-4.3.1):
> A payload within a GET request m... | hyperium__hyper-1926 | diff --git a/tests/client.rs b/tests/client.rs
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -356,7 +356,7 @@ test! {
}
test! {
- name: client_get_implicitly_empty,
+ name: client_get_req_body_implicitly_empty,
server:
expected: "GET / HTTP/1.1\r\nhost: {addr}\r\n\r\n",
diff --git a/tests/cli... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 | |
[
"1902"
] | 0.2 | 4f2743991c227836c3886778512afe1297df3e5b | diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs
--- a/src/client/connect/http.rs
+++ b/src/client/connect/http.rs
@@ -3,6 +3,7 @@ use std::error::Error as StdError;
use std::io;
use std::mem;
use std::net::{IpAddr, SocketAddr};
+use std::sync::Arc;
use std::time::Duration;
use http::uri::{Sc... | I just remember there is also `MakeConnection` in tower, perhaps that can just be used instead. One difference is that hyper's `Connect` currently returns a `Connected` metadata type.
@seanmonstar I totally missed this issue! But we should drop the connected struct and use `http_connection::HttpConnection` trait. Which... | 2019-08-21T22:19:24Z | 1,912 | Change `Connect` trait to alias `Service`
After #1782 is done, the `Connect` trait should be changed to basically an alias for a `Service<Destination>`. This would allow more composability, being able to use `ServiceExt` to customize connectors.
| hyperium__hyper-1912 | diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs
--- a/src/client/connect/http.rs
+++ b/src/client/connect/http.rs
@@ -671,7 +698,15 @@ mod tests {
use tokio::runtime::current_thread::Runtime;
use tokio_net::driver::Handle;
- use super::{Connect, Destination, HttpConnector};
+ use ... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1851"
] | 0.2 | 4920f5e264c57f87dc8b91e7ed9a575359cc093c | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ futures-util-preview = { version = "0.3.0-alpha.17" }
http = "0.1.15"
http-body = "0.1"
httparse = "1.0"
-h2 = "0.1.10"
+h2 = { git = "https://github.com/hyperium/h2" }
iovec = "0.1"
itoa = "0.4.1"
log = "0.4"
diff --git a/sr... | Is there an issue/PR/branch that is tracking the update of h2 to `std::future`, is anyone working on it currently?
Related issue in the h2 repo: https://github.com/hyperium/h2/issues/385
The relevant work in the `h2` crate has merged! Next up: re-enabling the http2 stuff inside hyper. It should be a bit easier, mostly ... | 2019-08-19T22:27:17Z | 1,906 | Update h2 to std::future
As part of the upgrade to `std::future` (#1805), the HTTP2 support was left as `unimplemented!`. This needs to be re-enabled, but depends on the `h2` crate updating.
| hyperium__hyper-1906 | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -64,18 +64,14 @@ fn http1_parallel_x10_req_10mb(b: &mut test::Bencher) {
}
#[bench]
-#[ignore]
fn http2_get(b: &mut test::Bencher) {
- // FIXME: re-implement tests when `h2` upgrades to `async/a... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1893"
] | 0.2 | 9d5299b655b7db86462fdb3929acf16ce5c2f74d | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,15 +36,15 @@ log = "0.4"
net2 = { version = "0.2.32", optional = true }
pin-utils = "0.1.0-alpha.4"
time = "0.1"
-tokio = { git = "https://github.com/tokio-rs/tokio", optional = true, default-features = false, features = ["rt-full"] }
-tok... | 2019-08-09T01:55:54Z | 1,894 | Update to use tokio alpha from crates.io instead of from git
| hyperium__hyper-1894 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -55,8 +55,8 @@ spmc = "0.2"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
-tokio-fs = { git = "https://github.com/tokio-rs/tokio" }
-tokio-test = { git = "https://github.com/tokio-rs/tokio" }
+tokio-fs = "0.2.0-alpha.1"
+tokio-test = "... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a | |
[
"1863"
] | 0.2 | f93463b3d98d30f47653acde12bf3e42ba278f68 | diff --git a/examples/echo.rs b/examples/echo.rs
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -1,7 +1,5 @@
#![feature(async_await)]
-#![deny(warnings)]
-
-extern crate hyper;
+//#![deny(warnings)]
use hyper::{Body, Method, Request, Response, Server, StatusCode};
use hyper::service::{make_service_fn, service_fn... | Ah, I didn't realize others were testing hyper master for things. As part of #1836, master disabled running its tests in CI since they aren't updated yet.
I've seen the pattern of moving disabled things to a `tests_disabled` directory in other projects, I think doing that here would fix this? | 2019-07-12T20:30:29Z | 1,865 | master branch fails to build with --all-targets
````
cargo check --all-targets
Checking hyper v0.13.0-a.0 (/tmp/hyper)
error[E0463]: can't find crate for `futures`
--> tests/client.rs:4:1
|
4 | extern crate futures;
| ^^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
... | hyperium__hyper-1865 | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,7 +25,7 @@ matrix:
# fi
script:
- - cargo build $FEATURES
+ - cargo build $FEATURES --all-targets
# Disable tests temporarily
# - 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES -- --test-threads=1; fi'
# - 'if [... | hyperium/hyper | cc7d3058e84b63d26697026f44cdc153b208de9a |
[
"1777"
] | 0.1 | 79ae89e066f5fbfc1ce3612299671a14f7b35230 | diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@ matrix:
- rust: stable
env: FEATURES="--no-default-features"
# Minimum Supported Rust Version
- - rust: 1.27.0
+ - rust: 1.31.0
env: FEATURES="--no-default-features --featur... | hyper has tried when possible to link new compiler requirements with breaking changes. While we can sometimes use config flags to only enable things on newer version, I don't think there's a way to do that here, since this also requires putting `edition = "2018"` in the `Cargo.toml`...
@seanmonstar hyper does not reall... | 2019-07-09T21:51:16Z | 1,847 | Migration to Rust 2018
I think this can be done before `std::future` stabilized.
Currently, hyper doesn't follow some Rust 2018 manner;
* module rules (include `extern crate`)
* hidden lifetime parameter
* bare trait
| hyperium__hyper-1847 | diff --git a/src/body/chunk.rs b/src/body/chunk.rs
--- a/src/body/chunk.rs
+++ b/src/body/chunk.rs
@@ -176,7 +176,7 @@ mod tests {
let mut dst = Vec::with_capacity(128);
b.iter(|| {
- let chunk = ::Chunk::from(s);
+ let chunk = crate::Chunk::from(s);
dst.put(chunk)... | hyperium/hyper | 79ae89e066f5fbfc1ce3612299671a14f7b35230 |
[
"1797"
] | 0.12 | 7fde9ba6b8a6cbc1880a518ee303aeb3e08f7847 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -476,14 +476,20 @@ impl Http1Transaction for Server {
},
None |
Some(BodyLength::Known(0)) => {
- extend(dst, b"content-length: 0\r\n");... | This gets set here: https://github.com/hyperium/hyper/blob/8d70baca611869c1997571e8513717396b13328b/src/proto/h1/role.rs#L479
A check could be added there for cases when there should be no header added. | 2019-04-25T01:33:34Z | 1,801 | Hyper should skip automatic Content-Length header for HTTP 304 responses
It's unnecessary, see [RFC 7232](https://tools.ietf.org/html/rfc7232#section-4.1).
Currently Hyper for empty bodies with Content-Length header unset automatically sets the value 0 which is incorrect for HTTP 304 responses, the correct values ar... | hyperium__hyper-1801 | diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs
--- a/src/proto/h1/role.rs
+++ b/src/proto/h1/role.rs
@@ -1591,4 +1597,3 @@ mod tests {
})
}
}
-
diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -1687,6 +1687,51 @@ fn http2_service_poll_ready_error_sen... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 |
[
"1740"
] | 0.12 | ec7b93c982dfaf7b213170d967bab809dbe53d8a | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -7,11 +7,13 @@
//! - The [`Resolve`](Resolve) trait and related types to build a custom
//! resolver for use with the `HttpConnector`.
use std::{fmt, io, vec};
+use std::error::Erro... | 2019-01-10T10:02:14Z | 1,741 | Add FromStr impl for hyper::client::connect::dns::Name
To allow people to construct a `Name`, such as when unit testing a `Resolve` implementation. Providing a `FromStr` impl instead of just `new(String) -> Name` allows us to add in validation in the future if need be.
| hyperium__hyper-1741 | diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/connect/dns.rs
+++ b/src/client/connect/dns.rs
@@ -317,4 +345,10 @@ mod tests {
assert!(preferred.next().unwrap().is_ipv6());
assert!(fallback.next().unwrap().is_ipv4());
}
+
+ #[test]
+ fn test_name_from_st... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 | |
[
"1708"
] | 0.12 | a6fff13a392d3394cacb1215f83bd8ec87671566 | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -96,6 +116,11 @@ impl Opts {
self
}
+ fn response_body(mut self, body: &'static [u8]) -> Self {
+ self.response_body = body;
+ self
+ }
+
fn parallel(mut self, c... | 2018-11-28T01:02:13Z | 1,725 | Adaptive Read Buffer
Add an adaptive read buffer strategy for `proto::h1::io::Buffered`, such that the size of the read buffer changes depending on the amount of bytes that are found on the transport for each `read` operation. This concept is similar to Netty's [AdaptiveRecvByteBufAllocator](https://github.com/netty/ne... | hyperium__hyper-1725 | diff --git a/benches/end_to_end.rs b/benches/end_to_end.rs
--- a/benches/end_to_end.rs
+++ b/benches/end_to_end.rs
@@ -29,6 +29,26 @@ fn http1_post(b: &mut test::Bencher) {
.bench(b)
}
+#[bench]
+fn http1_body_100kb(b: &mut test::Bencher) {
+ let body = &[b'x'; 1024 * 100];
+ opts()
+ .method(M... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 | |
[
"1716"
] | 0.12 | c35bdca8fab3facfc69a2d85c2fe4eb46887e716 | diff --git a/src/proto/h1/conn.rs b/src/proto/h1/conn.rs
--- a/src/proto/h1/conn.rs
+++ b/src/proto/h1/conn.rs
@@ -38,6 +38,7 @@ where I: AsyncRead + AsyncWrite,
Conn {
io: Buffered::new(io),
state: State {
+ allow_half_close: true,
cached_headers: None... | I haven't really investigated, could the fix for #1717 have fixed this too?
I will try and report back tomorrow.
I tried. It's not fixed. The way to reproduce it:
1. Run the broker.
2. Run the worker.
...
3. Restart the worker. The broker should report "Dropping Next()" but does not.
next curl request fails.
I thi... | 2018-11-27T00:24:56Z | 1,723 | Response future not dropped on disconnect
In certain cases I see Response future is not dropped when the connection closes. I have a minimal reproduction here: https://github.com/luben/repro-hyper
The reproduction is simplified work queue - workers wait on `GET /next`, clients submit work to `POST /`, worker submit... | hyperium__hyper-1723 | diff --git a/tests/server.rs b/tests/server.rs
--- a/tests/server.rs
+++ b/tests/server.rs
@@ -991,6 +991,71 @@ fn nonempty_parse_eof_returns_error() {
rt.block_on(fut).expect_err("partial parse eof is error");
}
+#[test]
+fn socket_half_closed() {
+ let _ = pretty_env_logger::try_init();
+ let mut rt = R... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 |
[
"1485"
] | 0.12 | bf188b28fe1f2c1c368824926a77df78f0d00a13 | diff --git a/src/client/conn.rs b/src/client/conn.rs
--- a/src/client/conn.rs
+++ b/src/client/conn.rs
@@ -466,6 +466,7 @@ impl Builder {
T: AsyncRead + AsyncWrite + Send + 'static,
B: Payload + 'static,
{
+ trace!("client handshake HTTP/{}", if self.http2 { 2 } else { 1 });
Hands... | Talking through this a bit on IRC, here's some clarification. A user likely has various ways they want to declare when to use HTTP/1 vs HTTP/2. A major way to do is with TLS' ALPN mechanism, but that seems best handled in the `Connect` implementation, since hyper has delegated all transport negotiation and establishmen... | 2018-10-27T02:00:20Z | 1,686 | Add ALPN/HTTP2 support to Connect
The `Connect` trait allows to provide information to the connector in the `Destination` type. It should be augmented to allow requesting ALPN for HTTP2, and the returned `Connected` type should include a way for the connector to inform the `Client` whether HTTP2 was negotiated.
| hyperium__hyper-1686 | diff --git a/src/client/pool.rs b/src/client/pool.rs
--- a/src/client/pool.rs
+++ b/src/client/pool.rs
@@ -190,7 +191,7 @@ impl<T: Poolable> Pool<T> {
#[cfg(feature = "runtime")]
#[cfg(test)]
pub(super) fn h1_key(&self, s: &str) -> Key {
- (Arc::new(s.to_string()), Ver::Http1)
+ Arc::new(s.... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 |
[
"1676"
] | 0.12 | 6fe532da4cbbd7395589e7774de79d3728184395 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,6 +35,7 @@ tokio-io = "0.1"
tokio-reactor = { version = "0.1", optional = true }
tokio-tcp = { version = "0.1", optional = true }
tokio-timer = { version = "0.2", optional = true }
+tokio-threadpool = { version = "0.1", optional = true }
... | cc @sfackler | 2018-10-20T17:56:38Z | 1,678 | Consider a Resolver that uses tokio-threadpool::blocking instead of futures-cpupool
Using `tokio_threadpool::blocking` can reduce some overhead, and make resolving use an existing threadpool instead of needing a separate dedicated one. It can't be the default, since it only works if the executor is `tokio_threadpool`, ... | hyperium__hyper-1678 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -62,6 +63,7 @@ runtime = [
"tokio-reactor",
"tokio-tcp",
"tokio-timer",
+ "tokio-threadpool",
]
nightly = []
__internal_flaky_tests = []
diff --git a/src/client/connect/dns.rs b/src/client/connect/dns.rs
--- a/src/client/conn... | hyperium/hyper | a1609fbb332fccffbeb85d16f1cc0bf98c6ede21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.