Forum Discussion
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 }
- Pat_70435Altocumulus
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.
what exactly is the wiki not saying, you checked this page right: https://devcentral.f5.com/wiki/iRules.HTTP_RESPONSE.ashx
2nd example shows inserting a header
3rd example hints what to do if you need the content, HTTP::collect is your friend
https://devcentral.f5.com/wiki/iRules.HTTP__collect.ashx
then there is a huge list of actual examples on the bottom of the HTTP_RESPONSE page.
- Pat_70435Altocumulus
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 }
Recent Discussions
Related Content
* 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