Skip to content

Conversation

@cmcfarlen
Copy link
Contributor

No description provided.

@cmcfarlen cmcfarlen added this to the 10.2.0 milestone Oct 16, 2025
@cmcfarlen cmcfarlen self-assigned this Oct 16, 2025
@cmcfarlen
Copy link
Contributor Author

[approve ci autest 1]

@cmcfarlen cmcfarlen requested a review from zwoop October 16, 2025 19:31
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

We have to remember to remove PCRE::PCRE from our CMakeLists.txt files. I almost missed that in my url_sig PR.

@zwoop
Copy link
Contributor

zwoop commented Oct 16, 2025

[approve ci autest]

@cmcfarlen
Copy link
Contributor Author

Looks good.

We have to remember to remove PCRE::PCRE from our CMakeLists.txt files. I almost missed that in my url_sig PR.

I figured we would take pass after these are done to remove the PCRE dep and cleanup cmake. I can go ahead and remove it though.

@cmcfarlen cmcfarlen force-pushed the regex-header-rewrite branch from 5a96ebe to 61fc7ce Compare October 17, 2025 18:14
Comment on lines 151 to 155
if (!re.setRegexMatch(s, has_modifier(mods, CondModifiers::MOD_NOCASE))) {
TSError("[%s] Invalid regex: failed to precompile: %s", PLUGIN_NAME, s.c_str());
Dbg(pi_dbg_ctl, "Invalid regex: failed to precompile: %s", s.c_str());
throw std::runtime_error("Malformed regex");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we're removing the error since this is matching not pre-compiling. Is the Dbg log message wrong too then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the error into the helper class so it could also print the regex error. Currently you only get the regex that failed, now you'll get why and what character too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Should we move the Dbg log there too though with the extra information.

@cmcfarlen
Copy link
Contributor Author

[approve ci autest 3]

Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cmcfarlen cmcfarlen merged commit a15669b into apache:master Oct 18, 2025
15 checks passed
@cmcfarlen cmcfarlen deleted the regex-header-rewrite branch October 18, 2025 20:57
cmcfarlen added a commit to cmcfarlen/trafficserver that referenced this pull request Jan 7, 2026
* Update header_rewrite to use Regex

* PR review

* cast to int

* also move dbg for failed regex compile.

(cherry picked from commit a15669b)
cmcfarlen added a commit that referenced this pull request Jan 14, 2026
* Update header_rewrite to use Regex

* PR review

* cast to int

* also move dbg for failed regex compile.

(cherry picked from commit a15669b)
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.

3 participants