Hi,
I have the following TrafficScript rule:
if( string.regexmatch(http.getheader("User-Agent"), "crawl | bot | spider | Slurp"))
{
rate.use( "Limited", request.getRemoteIP());
}
It is continually logging the following error in the logs:
Line 1: Regular expression "crawl | bot | spider | Slurp", subject length 0: Aborted, because it returned error code: -2
Anyone have any idea what this means and how I can correct this?
Thanks,
Scott
Solved! Go to Solution.
Yes, I thought so.. You have tripped over a bug that was introduced in 9.3 and was remediated in 9.5
In the 9.5 Release Notes,
SR24693 The string.regexmatch() and string.regexsub() TrafficScript functions now
handle undefined strings correctly (fixes a regression introduced in 9.3).
What version of Stingray Traffic Manager are you running?
It's Stingray Traffic Manager Virtual Appliance 2000L 9.4. The rule syntax compiles successfully and saves without any errors. Thanks.
Yes, I thought so.. You have tripped over a bug that was introduced in 9.3 and was remediated in 9.5
In the 9.5 Release Notes,
SR24693 The string.regexmatch() and string.regexsub() TrafficScript functions now
handle undefined strings correctly (fixes a regression introduced in 9.3).
Ah, okay, thanks. I think we'll have to change the logic a little to get around this then, as I don't think we have the time to do a full application test (likely required to do an upgrade to 9.5).
Thanks,
Scott