mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-28 12:30:58 +00:00
Include ipv6 wrapping brackets [] in the result of mg_url_host()
This commit is contained in:
1 parent
8652006aea
commit
90a131bd29
5 files changed
+10
-15
No files matched your search
+2
-2
@@ -135,8 +135,8 @@ static void test_url(void) {
|
||||
ASSERT(vcmp(mg_url_host("p://bar:1234/a"), "bar"));
|
||||
ASSERT(vcmp(mg_url_host("p://u@bar:1234/a"), "bar"));
|
||||
ASSERT(vcmp(mg_url_host("p://u:p@bar:1234/a"), "bar"));
|
||||
ASSERT(vcmp(mg_url_host("p://u:p@[::1]:1234/a"), "::1"));
|
||||
ASSERT(vcmp(mg_url_host("p://u:p@[1:2::3]:1234/a"), "1:2::3"));
|
||||
ASSERT(vcmp(mg_url_host("p://u:p@[::1]:1234/a"), "[::1]"));
|
||||
ASSERT(vcmp(mg_url_host("p://u:p@[1:2::3]:1234/a"), "[1:2::3]"));
|
||||
ASSERT(vcmp(mg_url_host("p://foo/x:y/z"), "foo"));
|
||||
|
||||
// Port
|
||||
|
||||
Reference in new issue
Block a user