Having an issue with creating an iRule using HTTP::Path

Hello,

When I try creating an iRule I get the following error (I’m on v12.1.2):

error: [undefined procedure: HTTP::Path][HTTP::Path]

Here is the iRule (slight edit on URLs for security reasons):

when HTTP_REQUEST {
    if { [class match [IP::client_addr] equals example_dg] } {
        switch -glob [string tolower [HTTP::Path]] {
            "/test/url/*" -
            "/test/this/url/*" {
                event disable
            }
            default {
                reject
            }
        }
    }
}

I do not see anything wrong with this rule in the syntax - but I’ve been staring at it for awhile and might have gone blind to what may be causing it.

Is anyone able to shed some light?

Hi,

The right syntax is

HTTP::path

and not

HTTP::Path

.

The word path is lowercase