8000 URL parsing for google-compatible URLs by ethomson · Pull Request #6326 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

URL parsing for google-compatible URLs #6326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump t 8000 o
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
url: test that we don't expand % encoding in paths
  • Loading branch information
ethomson committed Jun 17, 2022
commit ffef8e01d3a2d7802d32d452f123fd2b97af3d38
12 changes: 12 additions & 0 deletions tests/util/url/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,15 @@ void test_url_parse__ipv6_invalid_addresses(void)
/* Invalid character inside address */
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata, "http://[fe8o::dcad:beff:fe00:0001]/resource"));
}

void test_url_parse__spaces_in_the_name(void)
{
cl_git_pass(git_net_url_parse(&conndata, "https://libgit2@dev.azure.com/libgit2/test/_git/spaces%20in%20the%20name"));
cl_assert_equal_s(conndata.scheme, "https");
cl_assert_equal_s(conndata.host, "dev.azure.com");
cl_assert_equal_s(conndata.port, "443");
cl_assert_equal_s(conndata.path, "/libgit2/test/_git/spaces%20in%20the%20name");
cl_assert_equal_s(conndata.username, "libgit2");
cl_assert_equal_p(conndata.password, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
0