File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 \n Host: www.example.com\r \n Accept: */*\r \n \r \n " ;
102+ let req = b"GET / HTTP/1.1 \r \n Host: www.example.com\r \n Accept: */*\r \n Connection: 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]
You can’t perform that action at this time.
0 commit comments