From 9ec83bc5eb3e9a9287af62bbed80bb3c1dd60a3b Mon Sep 17 00:00:00 2001 From: Zhengxi Li Date: Fri, 13 Jan 2023 21:47:44 +0000 Subject: [PATCH 1/2] Updated log message --- proxy/http/remap/UrlRewrite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc index fcd4f39ae14..dfbf50c747d 100644 --- a/proxy/http/remap/UrlRewrite.cc +++ b/proxy/http/remap/UrlRewrite.cc @@ -769,7 +769,7 @@ UrlRewrite::TableInsert(std::unique_ptr &h_table, url_mapping *mapping h_table->emplace(src_host, ht_contents); } if (!ht_contents->Insert(mapping)) { - Warning("Could not insert new mapping"); + Warning("Could not insert new mapping: duplicated entry exists."); return false; } return true; From 1adc0cec3890db44f711f8c8781d7f3ade581748 Mon Sep 17 00:00:00 2001 From: Zhengxi Li Date: Fri, 13 Jan 2023 22:29:31 +0000 Subject: [PATCH 2/2] Added a comment --- proxy/http/remap/UrlRewrite.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc index dfbf50c747d..e2ec415526a 100644 --- a/proxy/http/remap/UrlRewrite.cc +++ b/proxy/http/remap/UrlRewrite.cc @@ -769,7 +769,8 @@ UrlRewrite::TableInsert(std::unique_ptr &h_table, url_mapping *mapping h_table->emplace(src_host, ht_contents); } if (!ht_contents->Insert(mapping)) { - Warning("Could not insert new mapping: duplicated entry exists."); + // Trie::Insert only fails due to an attempt to add a duplicate entry. + Warning("Could not insert new mapping: duplicated entry exists"); return false; } return true;