You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/01/11 00:20:00 UTC

[trafficserver] branch master updated: Remove TSHttpTxnRedirectRequest appears experimental and unused.

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 35ea510  Remove TSHttpTxnRedirectRequest appears experimental and unused.
35ea510 is described below

commit 35ea510d3fc588fa4ec33da6b6416f983e34a730
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Thu Jan 10 22:35:47 2019 +0000

    Remove TSHttpTxnRedirectRequest appears experimental and unused.
---
 include/ts/experimental.h    |  1 -
 src/traffic_server/InkAPI.cc | 51 --------------------------------------------
 2 files changed, 52 deletions(-)

diff --git a/include/ts/experimental.h b/include/ts/experimental.h
index b6cfd35..8f9a818 100644
--- a/include/ts/experimental.h
+++ b/include/ts/experimental.h
@@ -195,7 +195,6 @@ tsapi TSReturnCode TSHttpTxnInfoIntGet(TSHttpTxn txnp, TSHttpTxnInfoKey key, TSM
  *  Return: TS_SUCESS/TS_ERROR
  ****************************************************************************/
 tsapi TSReturnCode TSHttpTxnCacheLookupCountGet(TSHttpTxn txnp, int *lookup_count);
-tsapi TSReturnCode TSHttpTxnRedirectRequest(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc url_loc);
 tsapi TSReturnCode TSHttpTxnServerRespIgnore(TSHttpTxn txnp);
 tsapi TSReturnCode TSHttpTxnShutDown(TSHttpTxn txnp, TSEvent event);
 tsapi TSReturnCode TSHttpTxnCloseAfterResponse(TSHttpTxn txnp, int should_close);
diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc
index 61de605..2969dbc 100644
--- a/src/traffic_server/InkAPI.cc
+++ b/src/traffic_server/InkAPI.cc
@@ -5122,57 +5122,6 @@ TSHttpTxnCacheLookupUrlSet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)
   return TS_SUCCESS;
 }
 
-/*
- * TSHttpTxnRedirectRequest is very odd.  It is only in experimental.h.
- * It is not used in any checked in code.  We should probably remove this.
- * SKH 1/15/2015
- */
-TSReturnCode
-TSHttpTxnRedirectRequest(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc url_loc)
-{
-  sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
-  sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
-  sdk_assert(sdk_sanity_check_url_handle(url_loc) == TS_SUCCESS);
-
-  URL u, *o_url, *r_url, *client_url;
-  HttpSM *sm             = (HttpSM *)txnp;
-  HttpTransact::State *s = &(sm->t_state);
-
-  u.m_heap     = ((HdrHeapSDKHandle *)bufp)->m_heap;
-  u.m_url_impl = (URLImpl *)url_loc;
-  if (!u.valid()) {
-    return TS_ERROR;
-  }
-
-  client_url = s->hdr_info.client_request.url_get();
-  if (!(client_url->valid())) {
-    return TS_ERROR;
-  }
-
-  s->redirect_info.redirect_in_process = true;
-  o_url                                = &(s->redirect_info.original_url);
-  if (!o_url->valid()) {
-    o_url->create(nullptr);
-    o_url->copy(client_url);
-  }
-  client_url->copy(&u);
-
-  r_url = &(s->redirect_info.redirect_url);
-  if (!r_url->valid()) {
-    r_url->create(nullptr);
-  }
-  r_url->copy(&u);
-
-  s->hdr_info.server_request.destroy();
-
-  s->request_sent_time           = 0;
-  s->response_received_time      = 0;
-  s->cache_info.write_lock_state = HttpTransact::CACHE_WL_INIT;
-  s->next_action                 = HttpTransact::SM_ACTION_REDIRECT_READ;
-
-  return TS_SUCCESS;
-}
-
 /**
  * timeout is in msec
  * overrides as proxy.config.http.transaction_active_timeout_out