Skip to content

Commit ca25fd1

Browse files
committed
chore: example.com returns HTTP/1.1
1 parent 7066a19 commit ca25fd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/socks5.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async fn socks5_relay_stream() {
9999
.await
100100
.unwrap();
101101

102-
let req = b"GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: */*\r\n\r\n";
102+
let req = b"GET / HTTP/1.1\r\nHost: www.example.com\r\nAccept: */*\r\nConnection: close\r\n\r\n";
103103
c.write_all(req).await.unwrap();
104104
c.flush().await.unwrap();
105105

@@ -108,8 +108,8 @@ async fn socks5_relay_stream() {
108108
let mut buf = Vec::new();
109109
r.read_until(b'\n', &mut buf).await.unwrap();
110110

111-
let http_status = b"HTTP/1.0 200 OK\r\n";
112-
assert!(buf.starts_with(http_status));
111+
let http_status = b"HTTP/1.1 200 OK\r\n";
112+
assert!(buf.starts_with(http_status), "buf: {:?}", str::from_utf8(&buf));
113113
}
114114

115115
#[tokio::test]

0 commit comments

Comments
 (0)