Forum Discussion
xiangyang_zhang
Nimbostratus
Apr 21, 2006Read&Write problem
With the irule below, can read-write problem happen ?
rule tls_flag {
when HTTP_REQUEST {
set tlsflg 0
if {[HTTP::method] equals "CONNECT"}{
set tlsflg 1
}
}
when HTTP_REQUEST_SEND {
if { $tlsreq equals 1 } {
HTTP::disable
}
}
}
Put it with an example
1. The instance 1, a HTTP request, invoke HTTP_REQUEST, so the tlsflg will be set as 0.
2. The instance 2, a HTTPS request, invokes HTTP_REQUEST, then tlsflg is set as 1.
3. Instance 1 going to invoke HTTP_REQUEST_SEND, at this point, what value is tlsflg, 0 or 1 ?
Thanks for any information !
2 Replies
Sort By
- Variables are shared within the same connection. If you want to use them across sessions, you'll have to reference them in the global namespace.
when HTTP_REQUEST { set local_var "some value" set ::global_var "some other value" log local0. "The local value is $local_var" log local0. "The global value is $::global_var" }
- xiangyang_zhang
Nimbostratus
Many thanks, Joe ! Your answer is always helpful and precise !
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