From 9cca423768ae1decb31e9182383c9b363514c739 Mon Sep 17 00:00:00 2001 From: Randall Meyer Date: Tue, 13 Oct 2020 08:17:18 -0700 Subject: [PATCH] Removes commented out code from esi plugin --- plugins/esi/combo_handler.cc | 12 ------------ plugins/esi/esi.cc | 8 -------- plugins/esi/lib/EsiParser.cc | 4 ---- plugins/esi/lib/Stats.cc | 9 --------- plugins/esi/lib/Variables.cc | 7 ------- plugins/esi/test/vars_test.cc | 8 +------- 6 files changed, 1 insertion(+), 47 deletions(-) diff --git a/plugins/esi/combo_handler.cc b/plugins/esi/combo_handler.cc index cc37082db29..3eb79ce2978 100644 --- a/plugins/esi/combo_handler.cc +++ b/plugins/esi/combo_handler.cc @@ -572,18 +572,6 @@ getDefaultBucket(TSHttpTxn /* txnp ATS_UNUSED */, TSMBuffer bufp, TSMLoc hdr_obj creq.defaultBucket = string(host, host_len); defaultBucketFound = true; - /* - for(int i = 0 ; i < host_len; i++) - { - if (host[i] == '.') - { - creq.defaultBucket = string(host, i); - defaultBucketFound = true; - break; - } - } - */ - TSHandleMLocRelease(bufp, hdr_obj, field_loc); LOG_DEBUG("defaultBucket: %s", creq.defaultBucket.data()); diff --git a/plugins/esi/esi.cc b/plugins/esi/esi.cc index 7c531f56fca..e8a71eda7b4 100644 --- a/plugins/esi/esi.cc +++ b/plugins/esi/esi.cc @@ -510,7 +510,6 @@ ContData::~ContData() static int removeCacheHandler(TSCont contp, TSEvent /* event ATS_UNUSED */, void * /* edata ATS_UNUSED */) { - // TSDebug(DEBUG_TAG, "[%s] event: %d", __FUNCTION__, (int)event); TSContDestroy(contp); // just ignore cache remove message return 0; @@ -1339,13 +1338,6 @@ isCacheObjTransformable(TSHttpTxn txnp, bool *intercept_header, bool *head_only) return false; } if (obj_status == TS_CACHE_LOOKUP_HIT_FRESH) { - /* - time_t respTime; - if (TSHttpTxnCachedRespTimeGet(txnp, &respTime) == TS_SUCCESS) { - TSError("[%s] RespTime; %d", __FUNCTION__, (int)respTime); - } - */ - TSDebug(DEBUG_TAG, "[%s] doc found in cache, will add transformation", __FUNCTION__); return isTxnTransformable(txnp, true, intercept_header, head_only); } diff --git a/plugins/esi/lib/EsiParser.cc b/plugins/esi/lib/EsiParser.cc index 4edfc4677a8..95080aa413e 100644 --- a/plugins/esi/lib/EsiParser.cc +++ b/plugins/esi/lib/EsiParser.cc @@ -171,10 +171,6 @@ EsiParser::_compareData(const string &data, size_t pos, const char *str, int str return COMPLETE_MATCH; } } else { - /* - _debugLog(_debug_tag, "[%s] string [%.*s] is not equal to data at position %d", - __FUNCTION__, str_len, str, pos); - */ return NO_MATCH; } } diff --git a/plugins/esi/lib/Stats.cc b/plugins/esi/lib/Stats.cc index d048b3a47bd..e728ef4ae6f 100644 --- a/plugins/esi/lib/Stats.cc +++ b/plugins/esi/lib/Stats.cc @@ -44,9 +44,6 @@ namespace Stats for (int i = 0; i < Stats::MAX_STAT_ENUM; ++i) { // FIXME doesn't return a value. g_system->create(i); - /* if (!g_system->create(i)) { - Utils::ERROR_LOG("[%s] Unable to create stat [%s]", __FUNCTION__, Stats::STAT_NAMES[i]); - }*/ } } } @@ -58,12 +55,6 @@ namespace Stats if (g_system) { // FIXME doesn't return a value. g_system->increment(st, step); - /* - if (!g_system->increment(st, step)) { - Utils::ERROR_LOG("[%s] Unable to increment stat [%s] by step [%d]", __FUNCTION__, step, - Stats::STAT_NAMES[st]); - } - */ } } } // namespace Stats diff --git a/plugins/esi/lib/Variables.cc b/plugins/esi/lib/Variables.cc index 8fe12f41bd3..e9109b44c47 100644 --- a/plugins/esi/lib/Variables.cc +++ b/plugins/esi/lib/Variables.cc @@ -388,13 +388,6 @@ Variables::_parseCookieString(const char *str, int str_len) void Variables::_parseUserAgentString(const char * /* str ATS_UNUSED */, int /* str_len ATS_UNUSED */) { - /* - string user_agent_str(str, str_len); // need NULL-terminated version - // TODO - code was here - char version_buf[64]; - // TODO - code was here - _insert(_dict_data[HTTP_USER_AGENT], VERSION_STRING, version_buf); - */ } void diff --git a/plugins/esi/test/vars_test.cc b/plugins/esi/test/vars_test.cc index 278d9731bfe..c10ac8eb4de 100644 --- a/plugins/esi/test/vars_test.cc +++ b/plugins/esi/test/vars_test.cc @@ -20,6 +20,7 @@ See the License for the specific language governing permissions and limitations under the License. */ + #include #include #include @@ -137,13 +138,6 @@ main() "Gecko/20091201 Firefox/3.5.6 (.NETgecko CLR 3.5.30729)", -1)); - /* - assert(esi_vars.getValue("HTTP_USER_AGENT{vendor}") == "Gecko"); - assert(esi_vars.getValue("HTTP_USER_AGENT{platform}") == "windows_xp"); - assert(esi_vars.getValue("HTTP_USER_AGENT{version}") == "1.9"); - assert(esi_vars.getValue("HTTP_USER_AGENT{blah}") == ""); - */ - assert(esi_vars.getValue("HTTP_ACCEPT_LANGUAGE{ka-in}") == "true"); esi_vars.clear();