util/UriRelative: allow "parent" to end with slash
This commit is contained in:
parent
2574615fa3
commit
58363cf4dd
@ -44,8 +44,8 @@ uri_is_child(const char *parent, const char *child) noexcept
|
||||
#endif
|
||||
|
||||
const char *suffix = StringAfterPrefix(child, parent);
|
||||
return suffix != nullptr &&
|
||||
*suffix == '/';
|
||||
return suffix != nullptr && *suffix != 0 &&
|
||||
(suffix == child || suffix[-1] == '/' || *suffix == '/');
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user