Skip to content

Commit

Permalink
Change send_continue() into send_info() as per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rawler committed Feb 6, 2022
1 parent 9dde7e1 commit bf7d5af
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,18 +1049,19 @@ impl<B: Buf> SendResponse<B> {
.map_err(Into::into)
}

/// Send a 100-continue response to a client request.
/// Send a non-final 1xx response to a client request.
///
/// The [`SendResponse`] instance is already associated with a received
/// request. This function may only be called once per instance and only if
/// [`send_reset`] or [`send_response`] has not been previously called.
/// request. This function may only be called if [`send_reset`] or
/// [`send_response`] has not been previously called.
///
/// [`SendResponse`]: #
/// [`send_reset`]: #method.send_reset
/// [`send_response`]: #method.send_response
pub fn send_continue(&mut self) -> Result<(), crate::Error> {
pub fn send_info(&mut self, response: Response<()>) -> Result<(), crate::Error> {
assert!(response.status().is_informational());
self.inner
.send_response(Response::builder().status(100).body(()).unwrap(), false)
.send_response(response, false)
.map_err(Into::into)
}

Expand Down

0 comments on commit bf7d5af

Please sign in to comment.