aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/service/pages
diff options
context:
space:
mode:
authorxenoxeno <xeno@ydb.tech>2022-11-03 11:14:48 +0300
committerxenoxeno <xeno@ydb.tech>2022-11-03 11:14:48 +0300
commit0be37017eb1e7f619347c5d923c81d1d54505794 (patch)
treed9f810b930c152ba130981a6d36b4d0598a9e86c /library/cpp/monlib/service/pages
parent5b229b5f88be3141722b369f4fb13bb933c29a28 (diff)
downloadydb-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.cpp6
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);