Selecting 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

I’d recommend looking into using the HTTP::retry command. This command allows you to actually re-send the request to the server.

Combine that with the HTTP::request command that will give you the original request, in case you want to modfy it, and you can send just about any request you want, to just about any server you want with the HTTP::retry command.

-Colin

Yep, the HTTP::retry command was added in 9.2.