Forum Discussion
Deb_Allen_18
May 18, 2005Historic F5 Account
substr function with termination character
BIG-IP v 9.0.5
trying to optimize some rules, and using substr with a termination character doesn't seem to work...
It seems to re-init the system and I lose SSH connectivity, and nothing further is processed by the rule.
For instance, I connect to the VS with the following rule as resource:
when HTTP_REQUEST {
set inbound_uri [string tolower [HTTP::uri]]
log "inbound_uri: $inbound_uri"
log "[substr $inbound_uri 1]"
log "[substr $inbound_uri 1 /]"
pool Test-Pool
}
and I see ONLY the handshake in a trace (no request packet is captured) and NONE of the expected log lines appear in the log. (Although it seems pretty clear that the request is being received by the BIG-IP, but are just not being captured or logged before the error I seem to be encountering restarts the services...)
If I comment out the 3rd log command, I see the expected behaviour: the handshake AND the request in a trace, and the first 2 log messages in the log with the expected substitutions.
I've tried with different termination chars, same difference. (Forward slash doesn't need to be quoted or escaped, does it?)
Am I doing something wrong here?
thx
/deb
- Deb,
when HTTP_REQUEST { set inbound_uri [string tolower [HTTP::uri]] log "inbound_uri: $inbound_uri" log "[substr $inbound_uri 1]" log "[substr $inbound_uri 1 "/"]" pool Test-Pool }
- unRuleY_95363Historic F5 AccountActually, you are running into a bug (CR48097) which is fixed in our next maintenance release coming out soon. You can also contact support to get a hotfix for 9.0.5 (just reference the above CR).
- Deb_Allen_18Historic F5 AccountI've requested the hotfix, thank for the heads up!
- Deb_Allen_18Historic F5 AccountThanks Joe.
- Deb_Allen_18Historic F5 Account
- unRuleY_95363Historic F5 AccountNo, you should not need to quote the /. In general, the only time you need to quote something is if it contains spaces.
set bar "This is a string" set foo {This is a list}
- Deb_Allen_18Historic F5 Accountexcellent information, thank you.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects