hyper icon indicating copy to clipboard operation
hyper copied to clipboard

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

Open Lordworms opened this issue 1 year ago • 1 comments

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 avatar Aug 15 '24 23:08 Lordworms

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.

seanmonstar avatar Aug 16 '24 00:08 seanmonstar