Pat_Miller_9897
Apr 23, 2009Nimbostratus
New 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 plan was to:
Send the URI headers to a pool to return the version So I can do a lookup. ( This is working )
From the Response look to see if its a redirect ( this works )
Do a select based on the Version ( This works )
Call a new pool or virtual server ( does not work )
I do not know if after I send the request to a new pool or virtual server if it can pickup the rest of the Data from the Client.
My remote sites do not all support 30x redirects for posts.
Many Thanks
Pat
when CLIENT_ACCEPTED {
set debug "1"
set esbi_count "1"
if $debug { log local0. "HTTP Rule int" }
}
when HTTP_REQUEST_DATA {
if $debug { log local0. "HTTP_REQUEST_DATA" }
}
when HTTP_RESPONSE {
if $debug { log local0. "ReSponse" }
if { [ HTTP::is_redirect ] } {
if $debug { log local0. "redirect" }
set esbi_count "1"
set Tenant_Version2 [HTTP::cookie tenant_VERSION]
if $debug { log local0. "before switch to $Tenant_Version2" }
switch $Tenant_Version2 {
v7_0 {
if $debug { log local0. "v7_0" }
virtual V_Apache2211
}
v8_0 {
if $debug { log local0. "v8_0" }
virtual V_SFTP_01
}
default { HTTP::redirect "http://www.somesite.com/very_bad_uri.php" }
}
} else {
if $debug { log local0. "no redirect" }
}
}
when HTTP_REQUEST {
if $esbi_count { log local0. "ReSponse bit set" }
if $debug { log local0. "HTTP Request Start" }
if $debug {log local0. "JSESSION: [HTTP::cookie JSESSIONID]" }
if $debug {log local0. "Default HOST: [HTTP::host]"}
set Tenant_Name ""
set Tenant_Version ""
set Tenant_URL ""
if $debug {log local0. "URI: [HTTP::uri]"}
if $debug {log local0. "Tenant Version before switch: $Tenant_Version"}
if $debug {log local0. "Tenant Name before switch: $Tenant_Name"}
pool P_test_vcookie
}