Forum Discussion
Angelo_Iannaril
Nimbostratus
Jan 28, 2007HTTP_REQUEST and HTTP_RESPONSE iRule events
We would like to know why we get [SSL::sessionid] seems to always give us different results from within when HTTP_REQUEST and HTTP_RESPONSE iRule events.
We would also like to know whether a local variable initialised within HTTP_REQUEST would still be in scope in HTTP_RESPONSE. It appears to be, but we don't understand why. Please, could someone explain this to me?
2 Replies
- Leo_Katona_5507
Nimbostratus
Not sure about the session ID problem, but about your second question, local iRule variables have a scope of the instance of the iRule in which they are created, not the individual event handler. Therefore, a variable created in the HTTP_REQUEST event handler of an iRule instance will still be in scope when the HTTP_RESPONSE event for the same iRule instance gets called.
If you like, you can use the unset statement to immediately clean up any variables once you're done with them. For example, to delete the variables myvar1, myvar2 and myvar3:unset -nocomplain myvar1 myvar2 myvar3
-Leo - Deb_Allen_18Historic F5 AccountActually, local variable scope is to the connection, not the iRule instance.
Variable values will traverse multiple events and multiple iRules applied to the same virtual server for the same connection unless unset.
/deb
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
