Forum Discussion

Pat_70435's avatar
Pat_70435
Icon for Altocumulus rankAltocumulus
Feb 23, 2017

Response details back from calling HTTP.

Question on an HTTP_Response

 

Has anyone done any work with HTTP Response in detail. Via the Wiki data I'm not seeing the data I'm looking for.

 

My questions go to within an HTTP Response does one have the ability to pull back granular details within a Virtual or within a Server Pool?

 

Can I pull back details off of a specific page that a user has hit via Virtual Server and Pool? Can one pull back specific data off a page outside of headers? Can we utilize if / else statements within a response? Can I inject cookies and different types of persistence into pages?

 

I don't have any specific examples, just want to see if anyone has done anything unique when an HTTP Response has been received. If you can provide examples that would be awesome.

 

  • I was unable to get this to work

       if { [[LB::server pool] contains loadbalancePool]}  {
                        Persist
                        Cookie Add
    
       } else 
                  pool loadbalancePool2
                  HTTP::header replace host www.newsite.com
       }
    

    I needed to utilize a switch statement for this to function -

       switch -glob [LB::server pool] {
           "/loadbalancedPool" {
           }
           Persist
           Cookie Add
           }
    
  • Here's one Example, Is it possible to pull back data in a response from a Pool?

    Is there any way to extract data from a Given Request made on a VIP or a Pool at all? Is there any way to re route the existing traffic in the event the response comes back failed and redirect within the response to another given pool.

     Http_Response
    
       if { [[LB::server pool] contains loadbalancePool]}  {
                        Persist
                        Cookie Add
    
       } else 
                  pool loadbalancePool2
                  HTTP::header replace host www.newsite.com
       }
    

    Through articles and investigating the googles I have been unable to find any examples of how to manipulate or pass data differently via an HTTP response within an irule. I know this can be done via a Request, but is it possible via Response if we have trouble with an application on the load balanced pool?

    Is this even possible? I have been unable to find any solid documentation on what an HTTP response irule can do as far as data extraction within an HTTP request.

  • I was unable to get this to work

       if { [[LB::server pool] contains loadbalancePool]}  {
                        Persist
                        Cookie Add
    
       } else 
                  pool loadbalancePool2
                  HTTP::header replace host www.newsite.com
       }
    

    I needed to utilize a switch statement for this to function -

       switch -glob [LB::server pool] {
           "/loadbalancedPool" {
           }
           Persist
           Cookie Add
           }