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


##########
plugins/header_rewrite/conditions.cc:
##########
@@ -347,8 +368,15 @@ ConditionUrl::append_value(std::string &s, const Resources 
&res)
     break;
   case URL_QUAL_QUERY:
     q_str = TSUrlHttpQueryGet(bufp, url, &i);
-    s.append(q_str, i);
-    Dbg(pi_dbg_ctl, "   Query parameters to match is: %.*s", i, q_str);
+    if (_query_param.empty()) {
+      s.append(q_str, i);
+      Dbg(pi_dbg_ctl, "   Query parameters to match is: %.*s", i, q_str);
+    } else {
+      swoc::TextView value = res.get_query_param(_query_param, q_str, i);
+
+      s.append(value.data(), value.size());
+      Dbg(pi_dbg_ctl, "   Query parameter %s value is: %.*s", 
_query_param.c_str(), static_cast<int>(value.size()), value.data());

Review Comment:
   Fixed



-- 
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