Forum Discussion
Simon_Knox_1115
Nimbostratus
Mar 01, 2006Selecting another pool from HTTP_RESPONSE
Hello,
Yet another question that I'm hoping for some advise on...
I want to send a HTTP request to a server which authenticates the request and replies with a HTTP header called access.
What I want to do is on the HTTP_RESPONSE is query this header and dependeing on its value redirect to another web application. Now this works if I use HTTP::redirect but I would like to change reselect another pool and send the request straight there rather than do a redirect.
My attempts are shown in the following code:
when HTTP_RESPONSE {
set access [HTTP::header ACCESS]
if { $access == "Granted" } {
HTTP::header replace "host" "www.application.com"
pool wwwDEFAULT
} else {
HTTP::redirect "http://support.application.com"
}
}
This doesn't seem to respond with a blank page if the $access equals 'Granted' if it equals anything else the HTTP::redirect kicks in as expected.
So is there away to send the traffic back to servers on HTTP_RESPOSE or am I going to have to use redirects?
Cheers
Simon
- Colin_Walker_12Historic F5 AccountI'd recommend looking into using the HTTP::retry command. This command allows you to actually re-send the request to the server.
- unRuleY_95363Historic F5 AccountYep, the HTTP::retry command was added in 9.2.
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