From d18b480c5d8a9c520910e90dcca7da5288f15b2d Mon Sep 17 00:00:00 2001 From: Leif Hedstrom Date: Mon, 2 Mar 2020 15:33:58 -0700 Subject: [PATCH] Removes some things deprecated from older versions --- .../api/functions/TSContScheduleOnPool.en.rst | 5 +-- .../api/types/TSThreadPool.en.rst | 6 ---- include/ts/apidefs.h.in | 2 -- include/ts/ts.h | 16 +-------- src/traffic_server/InkAPI.cc | 34 ------------------- 5 files changed, 2 insertions(+), 61 deletions(-) diff --git a/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst b/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst index 019aad39ac1..6ba03cf2553 100644 --- a/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst +++ b/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst @@ -44,11 +44,8 @@ Pool Properties =========================== ======================================================================================= ``TS_THREAD_POOL_NET`` Transaction processing threads. Continuations on these threads must not block. ``TS_THREAD_POOL_TASK`` Background threads. Continuations can perform blocking operations. -``TS_THREAD_POOL_SSL`` *DEPRECATED* - these are no longer used as of ATS 6. ``TS_THREAD_POOL_DNS`` DNS request processing. May not exist depending on configuration. Not recommended. -``TS_THREAD_POOL_REMAP`` *DEPRECATED* - these are no longer used. -``TS_THREAD_POOL_CLUSTER`` *DEPRECATED* - these are no longer used as of ATS 7. -``TS_THREAD_POOL_UDP`` *DEPRECATED* +``TS_THREAD_POOL_UDP`` UDP processing. =========================== ======================================================================================= In practice, any choice except ``TS_THREAD_POOL_NET`` or ``TS_THREAD_POOL_TASK`` is strongly not diff --git a/doc/developer-guide/api/types/TSThreadPool.en.rst b/doc/developer-guide/api/types/TSThreadPool.en.rst index 8366b2021b2..d9fb943e37e 100644 --- a/doc/developer-guide/api/types/TSThreadPool.en.rst +++ b/doc/developer-guide/api/types/TSThreadPool.en.rst @@ -37,16 +37,10 @@ Enumeration Members .. c:member:: TSThreadPool TS_THREAD_POOL_TASK -.. c:member:: TSThreadPool TS_THREAD_POOL_SSL - .. c:member:: TSThreadPool TS_THREAD_POOL_DNS -.. c:member:: TSThreadPool TS_THREAD_POOL_REMAP - -.. c:member:: TSThreadPool TS_THREAD_POOL_CLUSTER .. c:member:: TSThreadPool TS_THREAD_POOL_UDP Description =========== - diff --git a/include/ts/apidefs.h.in b/include/ts/apidefs.h.in index a33cc192d78..e71bd0bd8b6 100644 --- a/include/ts/apidefs.h.in +++ b/include/ts/apidefs.h.in @@ -824,9 +824,7 @@ typedef enum { TS_THREAD_POOL_NET, TS_THREAD_POOL_TASK, /* unlikely you should use these */ - TS_THREAD_POOL_SSL, TS_THREAD_POOL_DNS, - TS_THREAD_POOL_REMAP, TS_THREAD_POOL_UDP } TSThreadPool; diff --git a/include/ts/ts.h b/include/ts/ts.h index 79ad5236a0e..983abf2112b 100644 --- a/include/ts/ts.h +++ b/include/ts/ts.h @@ -2354,21 +2354,7 @@ tsapi TSReturnCode TSHttpTxnConfigStringGet(TSHttpTxn txnp, TSOverridableConfigK tsapi TSReturnCode TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey *conf, TSRecordDataType *type); /** - This API informs the core to try to follow redirections (e.g. 301 responses. - The new URL would be provided in the standard Location header. - - This is deprecated as of v8.0.0. You should instead rely on using the overridable - proxy.config.http.number_of_redirections setting. - - @param txnp the transaction pointer - @param on turn this on or off (0 or 1) - - @return @c TS_SUCCESS if it succeeded -*/ -tsapi TS_DEPRECATED TSReturnCode TSHttpTxnFollowRedirect(TSHttpTxn txnp, int on); - -/** - This is a generalization of the TSHttpTxnFollowRedirect(), but gives finer + This is a generalization of the old TSHttpTxnFollowRedirect(), but gives finer control over the behavior. Instead of using the Location: header for the new destination, this API takes the new URL as a parameter. Calling this API transfers the ownership of the URL from the plugin to the core, so you must diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc index 576169d3c61..b91712e4478 100644 --- a/src/traffic_server/InkAPI.cc +++ b/src/traffic_server/InkAPI.cc @@ -4569,15 +4569,9 @@ TSContScheduleOnPool(TSCont contp, TSHRTime timeout, TSThreadPool tp) case TS_THREAD_POOL_TASK: etype = ET_TASK; break; - case TS_THREAD_POOL_SSL: - etype = ET_TASK; // Should be ET_SSL - break; case TS_THREAD_POOL_DNS: etype = ET_DNS; break; - case TS_THREAD_POOL_REMAP: - etype = ET_TASK; // Should be ET_REMAP - break; case TS_THREAD_POOL_UDP: etype = ET_UDP; break; @@ -7789,34 +7783,6 @@ TSCacheHttpInfoSizeSet(TSCacheHttpInfo infop, int64_t size) info->object_size_set(size); } -// This API tells the core to follow normal (301/302) redirects using the -// standard Location: URL. This does not need to be called if you set an -// explicit URL using TSHttpTxnRedirectUrlSet(). -TSReturnCode -TSHttpTxnFollowRedirect(TSHttpTxn txnp, int on) -{ - sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); - - HttpSM *sm = (HttpSM *)txnp; - - // This is necessary since we might not have setup these overridable configurations - sm->t_state.setup_per_txn_configs(); - - if (on) { - sm->redirection_tries = 0; - sm->enable_redirection = true; - // Make sure we allow for at least one redirection. - if (sm->t_state.txn_conf->number_of_redirections <= 0) { - sm->t_state.my_txn_conf().number_of_redirections = 1; - } - } else { - sm->enable_redirection = false; - sm->t_state.my_txn_conf().number_of_redirections = 0; - } - - return TS_SUCCESS; -} - // this function should be called at TS_EVENT_HTTP_READ_RESPONSE_HDR void TSHttpTxnRedirectUrlSet(TSHttpTxn txnp, const char *url, const int url_len)