This is an automated email from the ASF dual-hosted git repository.

eze pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.1.x by this push:
     new 88046d6  doc: header_rewrite random function not inclusive (#7760) 
(#7781)
88046d6 is described below

commit 88046d6ba4daf31633e62b59706cb0777288f0c8
Author: mlibbey <[email protected]>
AuthorDate: Mon May 10 16:08:47 2021 -0700

    doc: header_rewrite random function not inclusive (#7760) (#7781)
    
    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 c3419e1..2e6b894 100644
--- a/doc/admin-guide/plugins/header_rewrite.en.rst
+++ b/doc/admin-guide/plugins/header_rewrite.en.rst
@@ -470,7 +470,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
 ~~~~~~

Reply via email to