Commit 58363cf4 authored by Max Kellermann's avatar Max Kellermann

util/UriRelative: allow "parent" to end with slash

parent 2574615f
...@@ -44,8 +44,8 @@ uri_is_child(const char *parent, const char *child) noexcept ...@@ -44,8 +44,8 @@ uri_is_child(const char *parent, const char *child) noexcept
#endif #endif
const char *suffix = StringAfterPrefix(child, parent); const char *suffix = StringAfterPrefix(child, parent);
return suffix != nullptr && return suffix != nullptr && *suffix != 0 &&
*suffix == '/'; (suffix == child || suffix[-1] == '/' || *suffix == '/');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment