File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1049,18 +1049,19 @@ impl<B: Buf> SendResponse<B> {
1049
1049
. map_err ( Into :: into)
1050
1050
}
1051
1051
1052
- /// Send a 100-continue response to a client request.
1052
+ /// Send a non-final 1xx response to a client request.
1053
1053
///
1054
1054
/// The [`SendResponse`] instance is already associated with a received
1055
- /// request. This function may only be called once per instance and only if
1056
- /// [`send_reset`] or [` send_response`] has not been previously called.
1055
+ /// request. This function may only be called if [`send_reset`] or
1056
+ /// [`send_response`] has not been previously called.
1057
1057
///
1058
1058
/// [`SendResponse`]: #
1059
1059
/// [`send_reset`]: #method.send_reset
1060
1060
/// [`send_response`]: #method.send_response
1061
- pub fn send_continue ( & mut self ) -> Result < ( ) , crate :: Error > {
1061
+ pub fn send_info ( & mut self , response : Response < ( ) > ) -> Result < ( ) , crate :: Error > {
1062
+ assert ! ( response. status( ) . is_informational( ) ) ;
1062
1063
self . inner
1063
- . send_response ( Response :: builder ( ) . status ( 100 ) . body ( ( ) ) . unwrap ( ) , false )
1064
+ . send_response ( response , false )
1064
1065
. map_err ( Into :: into)
1065
1066
}
1066
1067
You can’t perform that action at this time.
0 commit comments