You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Jacek Prucia <ja...@acn.waw.pl> on 2004/09/03 18:19:26 UTC
Re: fixed range for random variables
On Mon, 23 Aug 2004 07:45:17 -0700
"Guy Ferraiolo" <gu...@cnet.com> wrote:
> That's great. I have a need for non-numeric random substitution and I
> don't want to do something contradictory.
I was hoping for a few days dedicated to flood development, but I had to
settle for a few hours. Somehow I managed to prepare a patch which brings this
functionality (see attachment). You can use fixed size random numbers like
this:
<url requesttemplate="http://www.x.com/test?id=${(-6:27)=id}" />
If you omit colon like this:
<url requesttemplate="http://www.x.com/test?id=${(128)=id}" />
It will result in a range from 0 to 128.
This patch is very simple, and nearly offers no protection against wrong
ranges (like 543:-256), so use with care. If there are no objections it will
be commited, as soon, as I prepare paragraph describing this feature.
regards,
Jacek Prucia