You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2026/02/03 21:47:23 UTC
[PR] hrw4u: Adds QP parameter indexing by name [trafficserver]
zwoop opened a new pull request, #12853:
URL: https://github.com/apache/trafficserver/pull/12853
(no comment)
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] hrw4u: Adds QP parameter indexing by name [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #12853:
URL: https://github.com/apache/trafficserver/pull/12853#discussion_r2761322227
##########
doc/admin-guide/configuration/hrw4u.en.rst:
##########
@@ -182,8 +182,10 @@ cond %{CACHE} =hit-fresh cache() == "hit-fresh" Cache lookup
cond %{CIDR:24,48} =ip cidr(24,48) == "ip" Match masked client IP address
cond %{CLIENT-HEADER:X} =foo inbound.req.X == "foo" Original client request header
cond %{CLIENT-URL:<C>} =bar inbound.url.<C> == "bar" URL component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host``, ``path`` etc.
+cond %{CLIENT-URL:QUERY:<P>} inbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from URL
cond %{COOKIE:foo} =bar {in,out}bound.cookie.foo == "bar" Check a cookie value
cond %{FROM-URL:<C>} =bar from.url.<C> == "bar" Remap ``From URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{FROM-URL:QUERY:<P>} from.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``From URL``
Review Comment:
Fixed
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] hrw4u: Adds QP parameter indexing by name [trafficserver]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12853:
URL: https://github.com/apache/trafficserver/pull/12853#discussion_r2761162143
##########
doc/admin-guide/configuration/hrw4u.en.rst:
##########
@@ -182,8 +182,10 @@ cond %{CACHE} =hit-fresh cache() == "hit-fresh" Cache lookup
cond %{CIDR:24,48} =ip cidr(24,48) == "ip" Match masked client IP address
cond %{CLIENT-HEADER:X} =foo inbound.req.X == "foo" Original client request header
cond %{CLIENT-URL:<C>} =bar inbound.url.<C> == "bar" URL component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host``, ``path`` etc.
+cond %{CLIENT-URL:QUERY:<P>} inbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from URL
cond %{COOKIE:foo} =bar {in,out}bound.cookie.foo == "bar" Check a cookie value
cond %{FROM-URL:<C>} =bar from.url.<C> == "bar" Remap ``From URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{FROM-URL:QUERY:<P>} from.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``From URL``
Review Comment:
The header_rewrite syntax example for FROM-URL query parameter condition is incomplete. It should include the comparison operator and value for consistency with other condition examples in the table. For instance, this line should be `cond %{FROM-URL:QUERY:<P>} ="bar"` instead of just `cond %{FROM-URL:QUERY:<P>}`.
```suggestion
cond %{FROM-URL:QUERY:<P>} =bar from.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``From URL``
```
##########
doc/admin-guide/configuration/hrw4u.en.rst:
##########
@@ -196,12 +198,14 @@ cond %{IP:OUTBOUND} ="..." outbound.server == "..." ATS's outbou
cond %{LAST-CAPTURE:<#>} ="..." capture.<#> == "..." Last capture group from regex match (range: `0-9`)
cond %{METHOD} =GET inbound.method == "GET" HTTP method match
cond %{NEXT-HOP:<C>} ="bar" outbound.url.<C> == "bar" Next-hop URL component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{NEXT-HOP:QUERY:<P>} outbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from next-hop URL
cond %{NOW:<U>} ="..." now.<U> == "..." Current date/time in format, <:ref:`U<admin-plugins-header-rewrite-geo>`> selects time unit
cond %{OUTBOUND:CLIENT-CERT:<X>} outbound.client-cert.<X> Access the mTLS / client certificate details, on the outbound (upstream) connection
cond %{OUTbOUND:SERVER-CERT:<X>} outbound.client-cert.<X> Access the server (handshake) certificate details, on the outbound connection
cond %{RANDOM:500} >250 random(500) > 250 Random number between 0 and the specified range
cond %{SSN-TXN-COUNT} >10 ssn-txn-count() > 10 Number of transactions on server connection
cond %{TO-URL:<C>} =bar to.url.<C> == "bar" Remap ``To URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{TO-URL:QUERY:<P>} to.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``To URL``
Review Comment:
The header_rewrite syntax example for TO-URL query parameter condition is incomplete. It should include the comparison operator and value for consistency with other condition examples in the table. For instance, this line should be `cond %{TO-URL:QUERY:<P>} ="bar"` instead of just `cond %{TO-URL:QUERY:<P>}`.
```suggestion
cond %{TO-URL:QUERY:<P>} ="bar" to.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``To URL``
```
##########
doc/admin-guide/configuration/hrw4u.en.rst:
##########
@@ -196,12 +198,14 @@ cond %{IP:OUTBOUND} ="..." outbound.server == "..." ATS's outbou
cond %{LAST-CAPTURE:<#>} ="..." capture.<#> == "..." Last capture group from regex match (range: `0-9`)
cond %{METHOD} =GET inbound.method == "GET" HTTP method match
cond %{NEXT-HOP:<C>} ="bar" outbound.url.<C> == "bar" Next-hop URL component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{NEXT-HOP:QUERY:<P>} outbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from next-hop URL
cond %{NOW:<U>} ="..." now.<U> == "..." Current date/time in format, <:ref:`U<admin-plugins-header-rewrite-geo>`> selects time unit
cond %{OUTBOUND:CLIENT-CERT:<X>} outbound.client-cert.<X> Access the mTLS / client certificate details, on the outbound (upstream) connection
cond %{OUTbOUND:SERVER-CERT:<X>} outbound.client-cert.<X> Access the server (handshake) certificate details, on the outbound connection
cond %{RANDOM:500} >250 random(500) > 250 Random number between 0 and the specified range
cond %{SSN-TXN-COUNT} >10 ssn-txn-count() > 10 Number of transactions on server connection
cond %{TO-URL:<C>} =bar to.url.<C> == "bar" Remap ``To URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{TO-URL:QUERY:<P>} to.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``To URL``
Review Comment:
The header_rewrite syntax example for NEXT-HOP query parameter condition is incomplete. It should include the comparison operator and value for consistency with other condition examples in the table. For instance, this line should be `cond %{NEXT-HOP:QUERY:<P>} ="bar"` instead of just `cond %{NEXT-HOP:QUERY:<P>}`.
```suggestion
cond %{NEXT-HOP:QUERY:<P>} ="bar" outbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from next-hop URL
cond %{NOW:<U>} ="..." now.<U> == "..." Current date/time in format, <:ref:`U<admin-plugins-header-rewrite-geo>`> selects time unit
cond %{OUTBOUND:CLIENT-CERT:<X>} outbound.client-cert.<X> Access the mTLS / client certificate details, on the outbound (upstream) connection
cond %{OUTbOUND:SERVER-CERT:<X>} outbound.client-cert.<X> Access the server (handshake) certificate details, on the outbound connection
cond %{RANDOM:500} >250 random(500) > 250 Random number between 0 and the specified range
cond %{SSN-TXN-COUNT} >10 ssn-txn-count() > 10 Number of transactions on server connection
cond %{TO-URL:<C>} =bar to.url.<C> == "bar" Remap ``To URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
cond %{TO-URL:QUERY:<P>} ="bar" to.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``To URL``
```
##########
doc/admin-guide/configuration/hrw4u.en.rst:
##########
@@ -182,8 +182,10 @@ cond %{CACHE} =hit-fresh cache() == "hit-fresh" Cache lookup
cond %{CIDR:24,48} =ip cidr(24,48) == "ip" Match masked client IP address
cond %{CLIENT-HEADER:X} =foo inbound.req.X == "foo" Original client request header
cond %{CLIENT-URL:<C>} =bar inbound.url.<C> == "bar" URL component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host``, ``path`` etc.
+cond %{CLIENT-URL:QUERY:<P>} inbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from URL
cond %{COOKIE:foo} =bar {in,out}bound.cookie.foo == "bar" Check a cookie value
cond %{FROM-URL:<C>} =bar from.url.<C> == "bar" Remap ``From URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
+cond %{FROM-URL:QUERY:<P>} from.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``From URL``
Review Comment:
The header_rewrite syntax examples for query parameter conditions are incomplete. They should include the comparison operator and value for consistency with other condition examples in the table. For instance, line 185 should be `cond %{CLIENT-URL:QUERY:<P>} ="bar"` instead of just `cond %{CLIENT-URL:QUERY:<P>}`.
```suggestion
cond %{CLIENT-URL:QUERY:<P>} ="bar" inbound.url.query.<P> == "bar" Extract specific query parameter ``P`` from URL
cond %{COOKIE:foo} =bar {in,out}bound.cookie.foo == "bar" Check a cookie value
cond %{FROM-URL:<C>} =bar from.url.<C> == "bar" Remap ``From URL`` component match, <:ref:`C<admin-plugins-header-rewrite-url-parts>`> is ``host`` etc.
cond %{FROM-URL:QUERY:<P>} ="bar" from.url.query.<P> == "bar" Extract specific query parameter ``P`` from remap ``From URL``
```
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] hrw4u: Adds QP parameter indexing by name [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #12853:
URL: https://github.com/apache/trafficserver/pull/12853
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org