I don’t have a strong opinion either way, but I have a vague recollection
that this came from the fact that someone used to have hostnames in the
path. E.g. something like (maybe…)
https://cdn.example.com/origin1.example.com/some/path/
https://cdn.example.com/origin2.example.com/some/path/
etc. And I *think* that's the reason for keeping the // with the authority,
making it easy, safe (and maybe even possible sometimes) to distinguish it
from the path. I.e. a regex like
/\/\/cdn.*.com\/(.*\.example\.com)/
So, I’m -0 on this change, and I don’t know if it’s a use case anyone have
now. As such, I’m ok landing this, but given a choice I probably wouldn’t.
Cheers,
— Leif
On Wed, Nov 26, 2025 at 13:29 Brian Neradt <[email protected]> wrote:
> Hi [email protected],
>
> I'd like to propose a backwards-incompatible change to the regex_remap
> plugin for ATS 11.x to address a usability issue.
>
>
> *The Issue*When using the host option (@pparam=host), regex_remap currently
> prepends // to the match string, resulting in //host/path?query. This is
> confusing because users don't typically associate the // after the scheme
> with the host. When writing HTTP-to-HTTPS redirect rules like:
>
> ^(.*)$ https://$1 @status=307
>
> The result is https:////host/path (note four slashes) instead of the
> expected https://host/path. Users must write the unintuitive https:$1 to
> work around this.
>
>
> *The Proposed Fix*Remove the // prefix so the match string becomes
> host/path?query. This allows users to write straightforward redirect rules
> that work as expected.
>
> *Links*
>
> - For more details, see the issue:
> https://github.com/apache/trafficserver/issues/12691
> - PR: https://github.com/apache/trafficserver/pull/12706
>
> Since this is a backwards-incompatible change, it will only be included in
> ATS 11.x, not 10.x. Existing regex_remap configurations using the host
> option that match on // will need to be updated.
>
> I think this is a straightforward and helpful change, but let me know if
> I'm missing something and you have concerns.
>
> Thank you,
> Brian Neradt
> --
> "Come to Me, all who are weary and heavy-laden, and I will
> give you rest. Take My yoke upon you and learn from Me, for
> I am gentle and humble in heart, and you will find rest for
> your souls. For My yoke is easy and My burden is light."
>
> ~ Matthew 11:28-30
>