This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 8053ae2 doc: header_rewrite random function not inclusive (#7760)
8053ae2 is described below
commit 8053ae23c90f9c7dea2a66bb5134286ef2ebcc62
Author: mlibbey <[email protected]>
AuthorDate: Thu Apr 29 15:45:15 2021 -0700
doc: header_rewrite random function not inclusive (#7760)
In testing %{RANDOM:3}, ATS only prints 0,1, and 2. The code
rand_r(&_seed) % _max)
implies that the n value would not be chosen.
(cherry picked from commit 22cd7dafeddd5bec8b1623e9c135bb54f4160ee0)
---
doc/admin-guide/plugins/header_rewrite.en.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/admin-guide/plugins/header_rewrite.en.rst
b/doc/admin-guide/plugins/header_rewrite.en.rst
index 0ca0e3b..6cb0675 100644
--- a/doc/admin-guide/plugins/header_rewrite.en.rst
+++ b/doc/admin-guide/plugins/header_rewrite.en.rst
@@ -424,7 +424,7 @@ RANDOM
cond %{RANDOM:<n>} <operand>
-Generates a random integer between ``0`` and ``<n>``, inclusive.
+Generates a random integer from ``0`` up to (but not including) ``<n>``.
Mathmatically, ``[0,n)`` or ``0 <= r < n``.
STATUS
~~~~~~