Forum Discussion
Tomasz_Radzisze
Nimbostratus
Aug 14, 2007Variable set in SERVER_CONNECTED is unknown in SERVER_DATA
I have a problem with a variable in an iRule. I set a variable "inBody" in the SERVER_CONNECTED event, in which I also call TCP::collect. Then, when TCP data arrives and the SERVER_DATA event is trigg...
Deb_Allen_18
Aug 15, 2007Historic F5 Account
Sounds like your workaround is finding that inBody doesn't exist before you enter the loop, even though the variable is initialized unconditionally?
That is not expected behaviour, & I'd suggest opening a Support case referencing this post.
I just was talking with one of our iRules developers who indicated that there should always be a CONNECTED event before the DATA event for any connection, and it sounds like you may have encountered a product defect.
An alternative workaround would be to store the value in the session table in the CONNECTED event, then retrieving it in the DATA event. (Same workaround we use to save variables from the SSL handshake events for use in HTTP_REQUEST.)
HTH
/deb
I didn't notice a value being set for your loop control var $maxiter, though.
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