Skip to content

10.2.x: backport #13646 for the 10.2.1 release - #13668

Merged
cmcfarlen merged 1 commit into
apache:10.2.xfrom
cmcfarlen:10.2.x-pick-13646
Sep 11, 2026
Merged

10.2.x: backport #13646 for the 10.2.1 release#13668
cmcfarlen merged 1 commit into
apache:10.2.xfrom
cmcfarlen:10.2.x-pick-13646

Conversation

@cmcfarlen

Copy link
Copy Markdown
Contributor

Backport of #13646 for the 10.2.1 release.

PR master SHA Title
#13646 44ba301d522c header_rewrite: build the matcher for %{LAST-CAPTURE} conditions

ConditionLastCapture never overrode initialize(), so its _matcher stayed null and
eval() dereferenced it — any config using the documented condition form crashed
traffic_server on the first matching request. Applies to 10.2.x because the condition
itself is here: #12117 landed as cf4b17822e.

Conflict

header_rewrite_bundle.replay.yaml. The auto-merge dragged in a master-only set-body
JSON test group (from_21 / from_22 remaps, rule_json_body.conf,
rule_empty_json_body.conf, tests 90 and 91) from a PR that has not been picked to this
branch. Kept only what #13646 itself adds — the from_23 remap and tests 92, 93, 94 —
verified against git show 44ba301d522c -- <file>.

The result is byte-identical to master's addition for every file: 139 insertions, same
per-file counts. Post-resolution checks on the replay file: parses as YAML, 22 remaps with
no duplicate from values, 83 transactions with no duplicate uuids, and every referenced
rules/*.conf present in the tree.

Local: build clean, ctest 168/168. Autests were not runnable locally, so this PR's CI is
the gate for the new test runs.

Draft on purpose: lands on 10.2.x by fast-forward once CI is green, so history stays
identical to master's.

…che#13646)

* header_rewrite: build the matcher for %{LAST-CAPTURE} conditions

ConditionLastCapture never overrode initialize(), so its _matcher
stayed null and eval() dereferenced it: any config using the
documented condition form crashed traffic_server on the first
matching request. Only the value expansion form worked, which is
why this went unnoticed since apache#12117 added the condition.

The new autest covers both spellings, including the documented
"no previous match implies an empty string" case.

* Format conf for test

(cherry picked from commit 44ba301)
@cmcfarlen
cmcfarlen merged commit 9c3f439 into apache:10.2.x Sep 11, 2026
15 checks passed
@cmcfarlen
cmcfarlen deleted the 10.2.x-pick-13646 branch September 11, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants