From ca25fd1d601bb69d7121d67be5cd6e8a9cab1b2a Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Thu, 11 Dec 2025 07:26:19 +0800 Subject: [PATCH] chore: example.com returns HTTP/1.1 --- tests/socks5.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/socks5.rs b/tests/socks5.rs index ac62a73d..09150785 100644 --- a/tests/socks5.rs +++ b/tests/socks5.rs @@ -99,7 +99,7 @@ async fn socks5_relay_stream() { .await .unwrap(); - let req = b"GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n"; + let req = b"GET / HTTP/1.1\r\nHost: www.example.com\r\nAccept: */*\r\nConnection: close\r\n\r\n"; c.write_all(req).await.unwrap(); c.flush().await.unwrap(); @@ -108,8 +108,8 @@ async fn socks5_relay_stream() { let mut buf = Vec::new(); r.read_until(b'\n', &mut buf).await.unwrap(); - let http_status = b"HTTP/1.0 200 OK\r\n"; - assert!(buf.starts_with(http_status)); + let http_status = b"HTTP/1.1 200 OK\r\n"; + assert!(buf.starts_with(http_status), "buf: {:?}", str::from_utf8(&buf)); } #[tokio::test]