Forum Discussion

schusb's avatar
schusb
Icon for Nimbostratus rankNimbostratus
7 years ago

<http_request> - ERR_NOT_SUPPORTED (line 2) invoked from within "HTTP::query"</http_request>

We've running an iRule on v13.1.0.6 which works fine. After upgrading to v14.1.0 the same iRule causes an error:

err tmm[11570]: 01220001:3: TCL error: /Common/test_ir_asm_error-page  - ERR_NOT_SUPPORTED (line 2)     invoked from within "HTTP::query"

Here's the responsible part of the iRule:

when HTTP_REQUEST
{
set mainPath "show-error-page"
set mainPathExists "FALSE"

set httpQuery [HTTP::query]
set httpUri [HTTP::uri]
set httpUrlMin [call ir_asm_library::getMinimalizedUrl]

if {$httpUri contains $mainPath}
{
    set mainPathExists "TRUE"
    set iFileErrorPageName [URI::query [HTTP::uri] "page"]
}
}

Why we can't call [HTTP:query] , [HTTP:uri] or [HTTP:host] within a HTTP_REQUEST event anymore?

UPDATE:

We already solved the problem. This issue was caused by another iRule which is attached to the same vServer (executed before) and uses HTTP::respond in order to answer with a css-file used by the asm error page.

The following iRule

when HTTP_REQUEST
{
    switch -glob [string tolower [HTTP::uri]] {
        "/css/if_css_e.css" {HTTP::respond 200 content [ifile get if_asm_css_e] "Content-Type" "text/css" }
        "/css/if_css_e_ext.css" {HTTP::respond 200 content [ifile get if_asm_css_e_ext] "Content-Type" "text/css" }
        "/css/if_css_ee.css" {HTTP::respond 200 content [ifile get if_asm_css_ee] "Content-Type" "text/css" }
    }
}

was replaced by:

when HTTP_REQUEST
{
    switch -glob [string tolower [HTTP::uri]] {
        "/css/if_css_e.css" {HTTP::respond 200 content [ifile get if_asm_css_e] "Content-Type" "text/css"
        "Connection" "Close"
         event disable all }
        "/css/if_css_e_ext.css" {HTTP::respond 200 content [ifile get if_asm_css_e_ext] "Content-Type" "text/css"
        "Connection" "Close"
         event disable all }
        "/css/if_css_ee.css" {HTTP::respond 200 content [ifile get if_asm_css_ee] "Content-Type" "text/css"
        "Connection" "Close"
         event disable all }
    }
}

Is this a bug in v14.1 or a bug in in the iRule which was tolerated by v13.1.0.6 and v14.0.0 ?

5 Replies

No RepliesBe the first to reply