TS-2717 header-rewrite set-redirect not working
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9b236f12 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9b236f12 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9b236f12 Branch: refs/heads/5.0.x Commit: 9b236f1247289fc46ecb1cd2511e7a477a921138 Parents: b76b23c Author: Igor Brezac <[email protected]> Authored: Tue Apr 15 10:34:19 2014 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Tue Apr 15 10:34:19 2014 -0600 ---------------------------------------------------------------------- plugins/header_rewrite/operators.cc | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9b236f12/plugins/header_rewrite/operators.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/operators.cc b/plugins/header_rewrite/operators.cc index 7b3beb5..e22ab51 100644 --- a/plugins/header_rewrite/operators.cc +++ b/plugins/header_rewrite/operators.cc @@ -298,6 +298,9 @@ OperatorSetRedirect::exec(const Resources& res) const } TSHttpTxnSetHttpRetStatus(res.txnp,(TSHttpStatus)_status.get_int_value()); + const_cast<Resources&>(res).changed_url = true; + res._rri->redirect = 1; + //TSHttpHdrStatusSet(res.bufp, res.hdr_loc, (TSHttpStatus)_status.get_int_value()); const char *start = value.c_str(); const char *end = value.size() + start;
