Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection error: user body write aborted: early end, expected xxxx more bytes #3738

Open
Lordworms opened this issue Aug 15, 2024 · 1 comment
Labels
C-bug Category: bug. Something is wrong. This is bad!

Comments

@Lordworms
Copy link

Version
List the version(s) of hyper, and any relevant hyper dependency (such as h2 if this is related to HTTP/2).
hyper = { version = "0.14.26", features = ["stream"] }
Platform
The output of uname -a (UNIX), or version and 32 or 64-bit (Windows)
macos

Description
Enter your issue details here.
One way to structure the description:
�[2m2024-08-15T23:22:01.033223Z�[0m �[34mDEBUG�[0m �[2mhyper::proto::h1::io�[0m�[2m:�[0m flushed 8192 bytes
�[2m2024-08-15T23:22:01.033316Z�[0m �[34mDEBUG�[0m �[2mhyper::proto::h1::io�[0m�[2m:�[0m flushed 8192 bytes
�[2m2024-08-15T23:22:01.033304Z�[0m �[34mDEBUG�[0m �[2mhyper::server::server::new_svc�[0m�[2m:�[0m connection error: user body write aborted: early end, expected 8388608 more bytes
�[2mhyper::server::server::new_svc�[0m�[2m:�[0m connection error: connection error: Connection reset by peer (os error 54)
I was trying to use a stream way to transfer a large file, but got error anyway. the log is above

pub struct S3Response<T> {
    /// Operation output
    pub output: T,

    /// Response headers, overrides the headers in `output`.
    pub headers: HeaderMap<HeaderValue>,

    /// Response extensions.
    ///
    /// It is used to pass custom data between middlewares.
    pub extensions: Extensions,
}

[short summary of the bug]

I tried this code:

[code sample that causes the bug]

I expected to see this happen: [explanation]

Instead, this happened: [explanation]

@Lordworms Lordworms added the C-bug Category: bug. Something is wrong. This is bad! label Aug 15, 2024
@seanmonstar
Copy link
Member

Do you have any more info? The error message seems rather clear: you said you were going to send NN bytes, but you only sent M.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug. Something is wrong. This is bad!
Projects
None yet
Development

No branches or pull requests

2 participants