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.