Updated Branches:
  refs/heads/master 2abdac235 -> b771f6ee3

TS-2316: properly cherry-pick client header condition fix

This commit was cherry-picked with some errors:
    header_rewrite: fix for crash in client header condition

Pointy hat to: me (aivanov@)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/74ebe2ac
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/74ebe2ac
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/74ebe2ac

Branch: refs/heads/master
Commit: 74ebe2acdde7daebf4c6a610e105b3e7c1e3182c
Parents: c83a529
Author: Alexey Ivanov <[email protected]>
Authored: Tue Nov 12 18:32:36 2013 -0800
Committer: Alexey Ivanov <[email protected]>
Committed: Tue Nov 12 18:49:08 2013 -0800

----------------------------------------------------------------------
 plugins/header_rewrite/conditions.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/74ebe2ac/plugins/header_rewrite/conditions.cc
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/conditions.cc 
b/plugins/header_rewrite/conditions.cc
index 25bbae6..f57e6e9 100644
--- a/plugins/header_rewrite/conditions.cc
+++ b/plugins/header_rewrite/conditions.cc
@@ -192,10 +192,10 @@ ConditionHeader::append_value(std::string& s, const 
Resources& res)
     field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, _qualifier.c_str(), 
_qualifier.size());
     TSDebug(PLUGIN_NAME, "Getting Header: %s, field_loc: %p", 
_qualifier.c_str(), field_loc);
     if (field_loc != NULL) {
-      value = TSMimeHdrFieldValueStringGet(bufp, res.hdr_loc, field_loc, 0, 
&len);
+      value = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, 0, &len);
       TSDebug(PLUGIN_NAME, "Appending HEADER(%s) to evaluation value -> %.*s", 
_qualifier.c_str(), len, value);
       s.append(value, len);
-      TSHandleMLocRelease(bufp, res.hdr_loc, field_loc);
+      TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     }
   }
 }

Reply via email to