diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index d8eee469c..c9100f4c0 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -167,7 +167,11 @@ gcc_pure static const char * SkipUriScheme(const char *uri) noexcept { - const char *const schemes[] = { "http://", "https://", "ftp://" }; + static const char *const schemes[] = { + "http://", "https://", + "ftp://", + }; + for (auto scheme : schemes) { auto result = StringAfterPrefixCaseASCII(uri, scheme); if (result != nullptr)