Skip to content

Commit

Permalink
Potential place for 499 integration
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi DEMOLIS <eloi.demolis@clever-cloud.com>
  • Loading branch information
Wonshtrum committed Sep 7, 2022
1 parent 5e77738 commit 7b30066
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions lib/src/protocol/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1800,6 +1800,10 @@ impl<Front: SocketHandler, L: ListenerHandler> Http<Front, L> {
self.res_header_end = header_end2;
};

// we may check for 499 with get_status_line
// here and return (ProtocolResult::Continue, SessionResult::CloseSession)
// this should close the connection without sending a response to the client

if unwrap_msg!(self.response_state.as_ref()).is_back_error() {
self.set_answer(DefaultAnswerStatus::Answer502, None);
return (ProtocolResult::Continue, self.writable(metrics));
Expand Down
4 changes: 0 additions & 4 deletions lib/src/protocol/http/parser/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ pub fn parse_response(
match status_line(buf) {
Ok((input, raw_status_line)) => {
match StatusLine::from_raw_status_line(raw_status_line) {
// We may handle 499
// Some(499) => {
// (BufferMove::None, ResponseState::Error())
// }
Some(status_line) => {
let conn = Connection::new();
/*let conn = if rl.version == "11" {
Expand Down

0 comments on commit 7b30066

Please sign in to comment.