Forum Discussion
Jul 11, 2014
BIG-IP : variable value in case set fails
f5 BIG-IP LTM VE v11.4.0 on ESXi
tcl does not have a concept of null nil undefined
So what value do variables assume in the case where the set operation fails to retrieve a value ?
set param1 [URI::query [HTTP::uri] param1 ]
What is param1 value for case where "param1=xxx" not present in query-string ?
set cookie1 [HTTP::cookie value "cookie1"]
What's cookie1 value for case where request doesn't contain cookie "cookie1" ?
- Kevin_StewartEmployee
I would always general start with existent check before checking for an empty value:
if { ( [info exists param] ) and not ( $param eq "" ) }
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