Skip to content

Commit

Permalink
uri resolve example
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Dec 17, 2024
1 parent 26d7a87 commit e0f3649
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/jsoncons/utility/uri.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ namespace jsoncons {
++i;
break;
case '/':
if (!validate_host(string_view{str.data() + start, colon_pos}))
if (!validate_host(string_view{str.data() + start, colon_pos-start}))
{
ec = uri_errc::invalid_character_in_host;
return uri{};
Expand Down Expand Up @@ -1025,7 +1025,7 @@ namespace jsoncons {
fragment = std::make_pair(str.size(), str.size());
break;
case parse_state::expect_host:
if (!validate_host(string_view{str.data() + start, str.size()}))
if (!validate_host(string_view{str.data() + start, str.size()-start}))
{
ec = uri_errc::invalid_character_in_host;
return uri{};
Expand Down

0 comments on commit e0f3649

Please sign in to comment.