Forum Discussion

Jerel_Ware_4263's avatar
Jerel_Ware_4263
Icon for Nimbostratus rankNimbostratus
Jan 18, 2010

An interesting discovery...

The following iRule passes validation in the Web UI and the iRule editor, but causes the command line parser to fail load verifcation (and sync):

 

 

when HTTP_RESPONSE {

 

if { [HTTP::status] == "301" } {

 

respond with 302 using original Location value

 

HTTP::respond 302 Location [string map {"http://" "https://"} [HTTP::header Location]]

 

}

 

}

 

 

 

 

The problem is this section: [string map {"http://" "https://"}

 

 

If you remove the { } it still works and the command line parser no longer fails.

 

 

has anyone else had problems with this?

 

 

Running 9.4.7HF2.

1 Reply

  • Hi Jerel,

    There is an issue (which I thought was fixed by 9.4.7) described in SOL7988 (Click here) where iRule validation done by the CLI is more strict than the GUI. But that issue would occur if you didn't have any double quotes around the // in http:// or https://.

    Does the problem occur with the example you've posted where the http:// and https:// are in double quotes wrapped with curly braces? If so, I'd suggest you open a case with F5 Support to document the problem.

    I checked on 9.4.8 and didn't see the issue with a simple test rule:

     
     when HTTP_RESPONSE { 
        set test [string map {"http://" "https://"} "http://test"] 
        set test2 [string map "http:// https://" "http://test"] 
     } 
     

    b verify load

    Reading configuration from /defaults/config_base.conf.

    Reading configuration from /config/bigip_base.conf.

    Reading configuration from /config/bigip_sys.conf.

    Reading configuration from /usr/bin/monitors/builtins/base_monitors.conf.

    Reading configuration from /config/profile_base.conf.

    Reading configuration from /config/daemon.conf.

    Reading configuration from /config/bigip.conf.

    Reading configuration from /config/bigip_local.conf.

    Validating the configuration ...

    No problems found.

    Aaron