diff options
-rw-r--r-- | src/Uri.cpp | 2 | ||||
-rw-r--r-- | test/src/UriTests.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp index 51d14f4..fb9e1f8 100644 --- a/src/Uri.cpp +++ b/src/Uri.cpp @@ -520,7 +520,7 @@ namespace { const Uri::CharacterSet& allowedCharacters ) { std::string encodedElement; - for (auto c: element) { + for (uint8_t c: element) { if (allowedCharacters.Contains(c)) { encodedElement.push_back(c); } else { diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp index 72d9f72..75693cc 100644 --- a/test/src/UriTests.cpp +++ b/test/src/UriTests.cpp @@ -807,6 +807,7 @@ TEST(UriTests, GenerateString) { {"http", "bob", "www.example.com", true, 8080, {"", "a c", "def"}, true, "foobar", true, "ch2", "http://bob@www.example.com:8080/a%20c/def?foobar#ch2"}, {"http", "bob", "www.example.com", true, 8080, {"", "abc", "def"}, true, "foo ar", true, "ch2", "http://bob@www.example.com:8080/abc/def?foo%20ar#ch2"}, {"http", "bob", "www.example.com", true, 8080, {"", "abc", "def"}, true, "foobar", true, "c 2", "http://bob@www.example.com:8080/abc/def?foobar#c%202"}, + {"http", "bob", "ሴ.example.com", true, 8080, {"", "abc", "def"}, true, "foobar", false, "", "http://bob@%E1%88%B4.example.com:8080/abc/def?foobar"}, // normalization of IPv6 address hex digits {"http", "bob", "fFfF::1", true, 8080, {"", "abc", "def"}, true, "foobar", true, "c 2", "http://bob@[ffff::1]:8080/abc/def?foobar#c%202"}, |