Skip to content

Commit b917e35

Browse files
committed
Auto merge of #5997 - dwijnand:no-libgit2-user-agent-testing, r=alexcrichton
Drop the libgit2 User-Agent testing from http_auth_offered Fixes #5306
2 parents 5984312 + 85d1dc0 commit b917e35

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/testsuite/build_auth.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn http_auth_offered() {
1616
let addr = server.local_addr().unwrap();
1717

1818
fn headers(rdr: &mut BufRead) -> HashSet<String> {
19-
let valid = ["GET", "Authorization", "Accept", "User-Agent"];
19+
let valid = ["GET", "Authorization", "Accept"];
2020
rdr.lines()
2121
.map(|s| s.unwrap())
2222
.take_while(|s| s.len() > 2)
@@ -28,7 +28,6 @@ fn http_auth_offered() {
2828
let t = thread::spawn(move || {
2929
let mut conn = BufStream::new(server.accept().unwrap().0);
3030
let req = headers(&mut conn);
31-
let user_agent = "User-Agent: git/2.0 (libgit2 0.27.0)";
3231
conn.write_all(
3332
b"\
3433
HTTP/1.1 401 Unauthorized\r\n\
@@ -41,7 +40,6 @@ fn http_auth_offered() {
4140
vec![
4241
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
4342
"Accept: */*",
44-
user_agent,
4543
].into_iter()
4644
.map(|s| s.to_string())
4745
.collect()
@@ -63,7 +61,6 @@ fn http_auth_offered() {
6361
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
6462
"Authorization: Basic Zm9vOmJhcg==",
6563
"Accept: */*",
66-
user_agent,
6764
].into_iter()
6865
.map(|s| s.to_string())
6966
.collect()

0 commit comments

Comments
 (0)