Forum Discussion
Pat_Miller_9897
Nimbostratus
Apr 23, 2009New pool or Virtual Server Connection from within HTTP_RESPONSE
In the code below, I see the log message redirect, But it will not call a new virtual or a new pool.
I have an inbound soap request, that I do not know what pool to send it to, My ...
Nat_Thirasuttakorn
Employee
Apr 24, 2009Actually, I meant to use HTTP::retry in HTTP_RESPONSE. Then HTTP_REQUEST will be invoke again.
you can use pool or virtual command at that point..(sorry for confusion)
Here is an example.
when CLIENT_ACCEPTED {
set firsttime 1
}
whe HTTP_REQUEST {
if { $firsttime } {
first time go to pool that helps the selection...
pool P_test_vcookie
assume all requests that fall here are POST
HTTP::collect [HTTP::header Content-Length]
} else {
eval $real_dest
reset firsttime so next request will be evalulate again...
set firstime 1
}
}
when HTTP_REQUEST_DATA {
set original_request [HTTP::request][HTTP::payload [HTTP::header Content-Length]]
}
when HTTP_RESPONSE {
if it is first time (or probably can verify from server address)
if { $firsttime } {
let say real destination has been selected
set real_dest "virtual V_Apache2211"
HTTP::retry $original_request
set firsttime 0
}
}
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