Browse Source

Fix banner bug with HTTP proxies

pull/99/head
B. Blechschmidt 2 years ago
parent
commit
01a0d9164d
  1. 6
      src/http.rs

6
src/http.rs

@ -172,6 +172,8 @@ impl HttpConnection {
return Ok(());
}
let header_size = self.counter;
self.counter = 0;
self.crlf_state = 0;
@ -192,7 +194,9 @@ impl HttpConnection {
if status_code == 200 {
// Connection successful
self.state = HttpState::Established;
self.server_inbuf.clear();
// The server may have sent a banner already (SMTP, SSH, etc.).
// Therefore, server_inbuf must retain this data.
self.server_inbuf.drain(0..header_size);
return self.state_change().await;
}

Loading…
Cancel
Save