File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,22 @@ impl Error {
218218 }
219219
220220 /// Returns true if the connection closed before a message could complete.
221+ ///
222+ /// This means that the supplied IO connection reported EOF (closed) while
223+ /// hyper's HTTP state indicates more of the message (either request or
224+ /// response) needed to be transmitted.
225+ ///
226+ /// Some cases this could happen (not exhaustive):
227+ ///
228+ /// - A request is written on a connection, and the next `read` reports
229+ /// EOF (perhaps a server just closed an "idle" connection).
230+ /// - A message body is only partially receive before the connection
231+ /// reports EOF.
232+ /// - A client writes a request to your server, and then closes the write
233+ /// half while waiting for your response. If you need to support this,
234+ /// consider enabling [`half_close`].
235+ ///
236+ /// [`half_close`]: crate::server::conn::http1::Builder::half_close()
221237 pub fn is_incomplete_message ( & self ) -> bool {
222238 #[ cfg( not( all( any( feature = "client" , feature = "server" ) , feature = "http1" ) ) ) ]
223239 return false ;
You can’t perform that action at this time.
0 commit comments