diff options
author | xenoxeno <xeno@ydb.tech> | 2022-11-03 11:14:48 +0300 |
---|---|---|
committer | xenoxeno <xeno@ydb.tech> | 2022-11-03 11:14:48 +0300 |
commit | 0be37017eb1e7f619347c5d923c81d1d54505794 (patch) | |
tree | d9f810b930c152ba130981a6d36b4d0598a9e86c /library/cpp/monlib/service/pages | |
parent | 5b229b5f88be3141722b369f4fb13bb933c29a28 (diff) | |
download | ydb-0be37017eb1e7f619347c5d923c81d1d54505794.tar.gz |
fix hang on invalid url
Diffstat (limited to 'library/cpp/monlib/service/pages')
-rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/monlib/service/pages/index_mon_page.cpp b/library/cpp/monlib/service/pages/index_mon_page.cpp index f5c334cb83..2bfa0faca8 100644 --- a/library/cpp/monlib/service/pages/index_mon_page.cpp +++ b/library/cpp/monlib/service/pages/index_mon_page.cpp @@ -108,10 +108,10 @@ IMonPage* TIndexMonPage::FindPage(const TString& relativePath) { IMonPage* TIndexMonPage::FindPageByAbsolutePath(const TString& absolutePath) { TIndexMonPage* page = this; TString path = absolutePath; - if (path.StartsWith("/")) { - path.erase(0, 1); - } while (!path.empty()) { + while (path.StartsWith('/')) { + path.erase(0, 1); + } TString tryPath = path; while (!tryPath.empty()) { IMonPage* found = page->FindPage(tryPath); |