zwoop opened a new issue, #13619:
URL: https://github.com/apache/trafficserver/issues/13619

   Found while reviewing #13204 — reproduces on master.
   
   ```
   $ cd tools/hrw4u
   $ printf 'cond %{READ_REQUEST_HDR_HOOK}\n    set-header X-Foo "bar"\n' > 
/tmp/rr.hrw
   $ uv run ./scripts/u4wrh /tmp/rr.hrw > /tmp/rr.hrw4u ; cat /tmp/rr.hrw4u
   READ_REQUEST {
       outbound.req.X-Foo = "bar";
   }
   $ uv run ./scripts/hrw4u /tmp/rr.hrw4u
   /tmp/rr.hrw4u:2:4: error: outbound.req.X-Foo is not available in the 
READ_REQUEST section
   ```
   
   The reverse mapping and the section table disagree: `HEADER_CONTEXT_MAP` 
maps `PRE_REMAP`/`READ_REQUEST`/`SEND_REQUEST` to `outbound.req.` 
(`src/generators.py:70`), while `OPERATOR_MAP["outbound.req."]` declares 
`sections={SEND_REQUEST, READ_RESPONSE, SEND_RESPONSE}` (`src/tables.py:52`). 
`SEND_REQUEST` is fine; `READ_REQUEST` and `PRE_REMAP` are not.
   
   Affects `set-header`, `rm-header` and `add-header` in those two sections.
   


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