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

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


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

commit 301607bbf8a9d07245860c37f73f1ce383b7b93b
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 5caa270..e2ff1cd 100644
--- a/doc/admin-guide/plugins/header_rewrite.en.rst
+++ b/doc/admin-guide/plugins/header_rewrite.en.rst
@@ -429,7 +429,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