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

   When attempting to use a header_rewrite config under 10.1.0 that has a 
`cond` matching on some part of `%{URL}` in `SEND_REQUEST_HDR_HOOK`, the match 
never returns true. It appears that the plugin is unable to fetch the details 
of the outgoing request. `%{CLIENT-URL}` works as expected.
   
   This happens both as a global and remap plugin.
   
   Example config where the action never happens:
   
   ```
   cond %{SEND_REQUEST_HDR_HOOK}
   cond %{URL:HOST} /s3-/
   rm-header Range
   ```
   
   Debug output (above config added in `plugin.config`):
   
   ```
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.h:48 (Resources)> 
(dbg_header_rewrite) Calling CTOR for Resources (InkAPI)
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.cc:31 (gather)> 
(header_rewrite) Building resources, hook=TS_HTTP_SEND_REQUEST_HDR_HOOK
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.cc:39 (gather)> 
(header_rewrite) Adding TXN client request header buffers
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.cc:63 (gather)> 
(header_rewrite) Processing TS_HTTP_SEND_REQUEST_HDR_HOOK
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.cc:66 (gather)> 
(header_rewrite) Adding TXN server request header buffers
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <resources.cc:68 (gather)> 
(header_rewrite) could not gather bufp/hdr_loc for request
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <conditions.h:733 (eval)> 
(header_rewrite) Evaluating GROUP()
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <conditions.cc:324 (append_value)> 
(header_rewrite)    Host to match is:
   [Sep 10 16:23:03.069] [ET_NET 0] DIAG: <matcher.h:194 (test_reg)> 
(header_rewrite) Test regular expression s3- :  (NOCASE = 0)
   ```
   
   The `could not gather bufp/hdr_loc for request` message is caused by 
`TSHttpTxnServerReqGet` failing in `Resources::gather`. I could not immediately 
see a reason why this operation fails. I'm pretty sure this worked under 10.0.x.


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