zwoop opened a new pull request, #12562:
URL: https://github.com/apache/trafficserver/pull/12562

   This refactors the parsing / evaluation, to put most of the exec / 
evaluation logic into
   a new OperatorIf. This is not a real operator, that configurations would 
use, but allows
   for the conditionals to be nested. The syntax in HRW is not awesome, but 
best we can
   do within the constraints of backwards compatibility.
   
   As such, this PR also includes changes and additions to hrw4u, where nested 
if's are
   now supported and added to the existing if() / else semantics. E.g.
   
   ```
   SEND_RESPONSE {
       if inbound.status == 200 {
           inbound.resp.X-When-200-Before = "Yes";
           if inbound.req.X-Foo == "foo" {
               inbound.resp.X-Foo = "Yes";
               if inbound.req.X-Bar == "bar" with NOCASE {
                   inbound.resp.X-Foo-And-Bar = "Yes";
               } elif inbound.req.X-Fie == "fie" with NOCASE {
                   inbound.resp.X-Foo-And-Fie = "Yes";
               }
           } elif inbound.req.X-Foo == "maybe" {
   .
   .
   .
   
   ```


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