diff --git a/src/main.rs b/src/main.rs index e4136a7..63accb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,7 +62,7 @@ async fn proxy(mut incoming: TcpStream) -> Result<(), Box> { let mut req = Request::new(&mut headers); req.parse(&buf).unwrap(); - println!("buf {:#?}", str::from_utf8(&buf)?); + println!("{}\r\n------", str::from_utf8(&buf)?); match (req.method, req.path) { (Some("CONNECT"), Some(ref path)) => { @@ -112,9 +112,7 @@ async fn main() -> Result<(), Box> { let (tcp_stream, _) = tcp_listener.accept().await?; tokio::task::spawn(async move { match proxy(tcp_stream).await { - Ok(()) => { - println!("One socket processed successfully."); - } + Ok(()) => {} Err(e) => { println!("error: {:#?}", e); }