zwoop commented on code in PR #12363:
URL: https://github.com/apache/trafficserver/pull/12363#discussion_r2208250742


##########
plugins/header_rewrite/value.cc:
##########
@@ -55,6 +55,7 @@ Value::set_value(const std::string &val)
 
           if (parser.parse_line(_value)) {
             tcond_val->initialize(parser);
+            require_resources(tcond_val->get_resource_ids());

Review Comment:
   > why does Value need the resource ids? doesn't this get defined when 
initialize() is called
   
   So this is actually a bug in the original header_rewrite code. When you use 
a condition as a value, it didn't use to update the required resources 
properly. This mostly worked ok for regular cases, but with new resource 
values, it would fail. And yes, the resources are set in the initializations, 
but was never propagated from the "value" back to the operator (e.g. 
set-header):
   
   The use case here are things like
   
   ```
      set-header X-Cert "%{CERT:SUBBJECT"}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to