File tree 1 file changed +1
-4
lines changed 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn http_auth_offered() {
16
16
let addr = server. local_addr ( ) . unwrap ( ) ;
17
17
18
18
fn headers ( rdr : & mut BufRead ) -> HashSet < String > {
19
- let valid = [ "GET" , "Authorization" , "Accept" , "User-Agent" ] ;
19
+ let valid = [ "GET" , "Authorization" , "Accept" ] ;
20
20
rdr. lines ( )
21
21
. map ( |s| s. unwrap ( ) )
22
22
. take_while ( |s| s. len ( ) > 2 )
@@ -28,7 +28,6 @@ fn http_auth_offered() {
28
28
let t = thread:: spawn ( move || {
29
29
let mut conn = BufStream :: new ( server. accept ( ) . unwrap ( ) . 0 ) ;
30
30
let req = headers ( & mut conn) ;
31
- let user_agent = "User-Agent: git/2.0 (libgit2 0.27.0)" ;
32
31
conn. write_all (
33
32
b"\
34
33
HTTP/1.1 401 Unauthorized\r \n \
@@ -41,7 +40,6 @@ fn http_auth_offered() {
41
40
vec![
42
41
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1" ,
43
42
"Accept: */*" ,
44
- user_agent,
45
43
] . into_iter( )
46
44
. map( |s| s. to_string( ) )
47
45
. collect( )
@@ -63,7 +61,6 @@ fn http_auth_offered() {
63
61
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1" ,
64
62
"Authorization: Basic Zm9vOmJhcg==" ,
65
63
"Accept: */*" ,
66
- user_agent,
67
64
] . into_iter( )
68
65
. map( |s| s. to_string( ) )
69
66
. collect( )
You can’t perform that action at this time.
0 commit comments