vADC Forum

Reply
New Contributor
Posts: 3
Registered: ‎01-27-2014
Accepted Solution

TrafficScript Regular Expression error

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

Occasional Contributor
Posts: 5
Registered: ‎12-21-2012

Re: TrafficScript Regular Expression error

What version of Stingray Traffic Manager are you running?

New Contributor
Posts: 3
Registered: ‎01-27-2014

Re: TrafficScript Regular Expression error

It's Stingray Traffic Manager Virtual Appliance 2000L 9.4. The rule syntax compiles successfully and saves without any errors. Thanks.

Occasional Contributor
Posts: 5
Registered: ‎12-21-2012

Re: TrafficScript Regular Expression error

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).

New Contributor
Posts: 3
Registered: ‎01-27-2014

Re: TrafficScript Regular Expression error

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

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.