aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Uri.cpp2
-rw-r--r--src/lib.rs2
-rw-r--r--test/src/UriTests.cpp1
3 files changed, 3 insertions, 2 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp
index a556276..3d8b4fa 100644
--- a/src/Uri.cpp
+++ b/src/Uri.cpp
@@ -316,7 +316,7 @@ namespace {
if (c == ':') {
numDigits = 0;
++numGroups;
- state = ValidationState::AFTER_COLON_EXPECT_GROUP_OR_IPV4;
+ state = ValidationState::COLON_AFTER_GROUP;
} else if (c == '.') {
ipv4AddressEncountered = true;
break;
diff --git a/src/lib.rs b/src/lib.rs
index 7540e21..ffb6c8b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -358,7 +358,7 @@ fn validate_ipv6_address(address: &str) -> Result<(), Error> {
if c == ':' {
num_digits = 0;
num_groups += 1;
- ValidationState::AfterColonExpectGroupOrIpv4
+ ValidationState::ColonAfterGroup
} else if c == '.' {
ipv4_address_encountered = true;
break;
diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp
index 2fec3a0..e012627 100644
--- a/test/src/UriTests.cpp
+++ b/test/src/UriTests.cpp
@@ -731,6 +731,7 @@ TEST(UriTests, IPv6Address) {
{"http://[::ffff:1.2.3.4]/", "::ffff:1.2.3.4", true},
{"http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/", "2001:db8:85a3:8d3:1319:8a2e:370:7348", true},
{"http://[fFfF::1]", "fFfF::1", true},
+ {"http://[1234::1]", "1234::1", true},
{"http://[fFfF:1:2:3:4:5:6:a]", "fFfF:1:2:3:4:5:6:a", true},
// invalid