You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/08/10 01:55:12 UTC

[trafficserver] branch master updated: Fixes the renamed RenameTSHttpTxnSetHttpRetStatus() API

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

zwoop 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 447dd6f  Fixes the renamed RenameTSHttpTxnSetHttpRetStatus() API
447dd6f is described below

commit 447dd6f07bc36dba7b98d2d422c18e15d7967ddb
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu Aug 9 19:13:20 2018 -0600

    Fixes the renamed RenameTSHttpTxnSetHttpRetStatus() API
---
 plugins/experimental/access_control/plugin.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/plugins/experimental/access_control/plugin.cc b/plugins/experimental/access_control/plugin.cc
index c9f060a..10d3852 100644
--- a/plugins/experimental/access_control/plugin.cc
+++ b/plugins/experimental/access_control/plugin.cc
@@ -279,7 +279,7 @@ handleInvalidToken(TSHttpTxn txnp, AccessControlTxnData *data, bool reject, cons
 {
   TSRemapStatus resultStatus = TSREMAP_NO_REMAP;
   if (reject) {
-    TSHttpTxnSetHttpRetStatus(txnp, httpStatus);
+    TSHttpTxnStatusSet(txnp, httpStatus);
     resultStatus = TSREMAP_DID_REMAP;
   } else {
     data->_vaState = status;
@@ -395,7 +395,7 @@ contHandleAccessControl(const TSCont contp, TSEvent event, void *edata)
             } else {
               AccessControlDebug("failed to construct a valid origin access token, did not set-cookie with it");
               /* Don't set any cookie, fail the request here returning appropriate status code and body.*/
-              TSHttpTxnSetHttpRetStatus(txnp, config->_invalidOriginResponse);
+              TSHttpTxnStatusSet(txnp, config->_invalidOriginResponse);
               static const char *body = "Unexpected Response From the Origin Server\n";
               char *buf               = (char *)TSmalloc(strlen(body) + 1);
               sprintf(buf, "%s", body);
@@ -597,18 +597,18 @@ TSRemapDoRemap(void *instance, TSHttpTxn txnp, TSRemapRequestInfo *rri)
           }
         }
       } else {
-        TSHttpTxnSetHttpRetStatus(txnp, config->_invalidRequest);
+        TSHttpTxnStatusSet(txnp, config->_invalidRequest);
         AccessControlError("https is the only allowed scheme (plugin should be used only with TLS)");
         remapStatus = TSREMAP_DID_REMAP;
       }
     } else {
-      TSHttpTxnSetHttpRetStatus(txnp, config->_internalError);
+      TSHttpTxnStatusSet(txnp, config->_internalError);
       AccessControlError("failed to get request uri-scheme");
       remapStatus = TSREMAP_DID_REMAP;
     }
   } else {
     /* Something is terribly wrong, we cannot get the configuration */
-    TSHttpTxnSetHttpRetStatus(txnp, TS_HTTP_STATUS_INTERNAL_SERVER_ERROR);
+    TSHttpTxnStatusSet(txnp, TS_HTTP_STATUS_INTERNAL_SERVER_ERROR);
     AccessControlError("configuration unavailable");
     remapStatus = TSREMAP_DID_REMAP;
   }