Skip to content

Commit

Permalink
Auto merge of #3644 - Keruspe:master, r=alexcrichton
Browse files Browse the repository at this point in the history
ensure libressl compatibility

It looks like master still isn't compatible with libressl.

With this patch it builds and runs fine and all tests pass here.
  • Loading branch information
bors committed Feb 6, 2017
2 parents 6588631 + 2096c95 commit de2919f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
49 changes: 33 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions tests/build-auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ fn http_auth_offered() {
let t = thread::spawn(move|| {
let mut conn = BufStream::new(server.accept().unwrap().0);
let req = headers(&mut conn);
let user_agent = if cfg!(windows) {
"User-Agent: git/1.0 (libgit2 0.25.0)"
} else {
"User-Agent: git/2.0 (libgit2 0.25.0)"
};
conn.write_all(b"\
HTTP/1.1 401 Unauthorized\r\n\
WWW-Authenticate: Basic realm=\"wheee\"\r\n
Expand All @@ -41,7 +46,7 @@ fn http_auth_offered() {
assert_eq!(req, vec![
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
"Accept: */*",
"User-Agent: git/1.0 (libgit2 0.24.0)",
user_agent,
].into_iter().map(|s| s.to_string()).collect());
drop(conn);

Expand All @@ -56,7 +61,7 @@ fn http_auth_offered() {
"GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1",
"Authorization: Basic Zm9vOmJhcg==",
"Accept: */*",
"User-Agent: git/1.0 (libgit2 0.24.0)",
user_agent,
].into_iter().map(|s| s.to_string()).collect());
});

Expand Down

0 comments on commit de2919f

Please sign in to comment.