diff --git a/ylong_http_client/src/async_impl/http_body.rs b/ylong_http_client/src/async_impl/http_body.rs index d7ee09738106a4a4a9eb4744474729b31d12ba8c..acae13345f72abc6c93ce2f1622629c5b0f62a3a 100644 --- a/ylong_http_client/src/async_impl/http_body.rs +++ b/ylong_http_client/src/async_impl/http_body.rs @@ -237,10 +237,14 @@ impl UntilClose { let mut read = read; let mut read_buf = ReadBuf::new(&mut buf[read..]); match Pin::new(&mut io).poll_read(cx, &mut read_buf) { - // Disconnected. Poll::Ready(Ok(())) => { let filled = read_buf.filled().len(); if filled == 0 { + // Stream closed, and get the fin. + if io.is_stream_closable() { + return Poll::Ready(Ok(0)); + } + // Disconnected for http1. io.shutdown(); } else { self.interceptors diff --git a/ylong_http_client/src/util/c_openssl/error.rs b/ylong_http_client/src/util/c_openssl/error.rs index 23f5018503f8d8f688caa15191f7dc527e11bbe4..389a27055069fedb5134736d6685ff93e67ac7c3 100644 --- a/ylong_http_client/src/util/c_openssl/error.rs +++ b/ylong_http_client/src/util/c_openssl/error.rs @@ -399,7 +399,7 @@ mod ut_stack_error { #[cfg(feature = "c_openssl_3_0")] assert_eq!( msg, - "error:00000001lib: (0), :func(0)reason(1), :\"TEST\":1:Test" + "error:00000001lib: (0), :func(0)reason: (1), :\"TEST\":1:Test" ); } @@ -431,7 +431,7 @@ mod ut_stack_error { #[cfg(feature = "c_openssl_3_0")] assert_eq!( msg, - "error:00000001lib: (0), :func(0)reason(1), :\"TEST\":1:Test" + "error:00000001lib: (0), :func(0)reason: (1), :\"TEST\":1:Test" ); }