repo stringclasses 1
value | pull_number int64 20 3.81k | instance_id stringlengths 18 20 | issue_numbers sequencelengths 1 2 | base_commit stringlengths 40 40 | patch stringlengths 214 153k | test_patch stringlengths 288 262k | problem_statement stringlengths 22 7.42k | hints_text stringlengths 0 66.9k | created_at stringlengths 20 20 | version stringclasses 21
values | environment_setup_commit stringclasses 21
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
hyperium/hyper | 3,813 | hyperium__hyper-3813 | [
"3811"
] | 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);
... | 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::... | 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... | Thanks for the sample code, I'll get this fixed today 🫡 | 2024-12-16T15:39:30Z | 0.14 | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
hyperium/hyper | 3,812 | hyperium__hyper-3812 | [
"3811"
] | 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... | 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 ||... | 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... | Thanks for the sample code, I'll get this fixed today 🫡 | 2024-12-16T14:50:50Z | 1.5 | a3bda62da36060a38638fba983a0c07c0ab6259d |
hyperium/hyper | 3,799 | hyperium__hyper-3799 | [
"3790"
] | 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-... | 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
... | 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... | 2024-11-28T16:18:04Z | 1.5 | a3bda62da36060a38638fba983a0c07c0ab6259d | |
hyperium/hyper | 3,787 | hyperium__hyper-3787 | [
"3786"
] | 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
--... | 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... | 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... | 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 | 1.5 | a3bda62da36060a38638fba983a0c07c0ab6259d |
hyperium/hyper | 3,725 | hyperium__hyper-3725 | [
"3720"
] | 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... | 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();
- ... | 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... | 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 | 1.4 | 4c4de90a7e2aa0629b9c167a482399e28ccb0975 |
hyperium/hyper | 3,691 | hyperium__hyper-3691 | [
"3673"
] | 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... | 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... | 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... | 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 | 1.3 | aa7ff605da3b706e855f9633b8dddeb9463217d4 |
hyperium/hyper | 3,637 | hyperium__hyper-3637 | [
"2703"
] | 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... | 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,
+ ... | Receiving HTTP/1.1 trailers
| 2024-04-17T00:18:10Z | 1.3 | aa7ff605da3b706e855f9633b8dddeb9463217d4 | |
hyperium/hyper | 3,616 | hyperium__hyper-3616 | [
"3615",
"3615"
] | 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... | 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 (... | 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... | 2024-03-30T11:42:44Z | 1.2 | bc9a86f58f8bd5c35b2bfd7e632ec132280d79ba | |
hyperium/hyper | 3,517 | hyperium__hyper-3517 | [
"3477"
] | 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"] }... | 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];... | 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... | Can I take this one? | 2024-01-08T16:38:08Z | 1.1 | a9fa893f18c6409abae2e1dcbba0f4487df54d4f |
hyperium/hyper | 3,375 | hyperium__hyper-3375 | [
"2719"
] | 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... | 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... | 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... | @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 | 1.0 | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
hyperium/hyper | 3,312 | hyperium__hyper-3312 | [
"2844"
] | 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 ... | 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... | 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... | I filed a proposal for the working group: https://github.com/rust-lang/project-error-handling/issues/53 | 2023-09-11T20:09:02Z | 1.0 | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
hyperium/hyper | 3,275 | hyperium__hyper-3275 | [
"2872"
] | 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))));
... | 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... | 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 ... | 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 | 1.0 | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
hyperium/hyper | 3,274 | hyperium__hyper-3274 | [
"2872"
] | 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... | 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... | 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 ... | 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 | 0.14 | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
hyperium/hyper | 3,261 | hyperium__hyper-3261 | [
"2730"
] | 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)
+ ... | 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... | 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... | 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 | 1.0 | 6fd696e10974f10b2c6b9d16393bbbfa21c2333f |
hyperium/hyper | 3,257 | hyperium__hyper-3257 | [
"3253"
] | 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());
+ }
+
... | 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, ... | 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... | 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 | 0.14 | a24f0c0af8e1f4c6b7cc3a47c83eb6e4af88aca6 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 5