Forum Discussion
William_Them_99
Nimbostratus
Jun 15, 2005Events after HTTP_REQUEST
Are there any events that occur after HTTP_REQUEST but before the bigip actually routes the request?
For instance, in the HTTP_REQUEST event you can say "pool mypool", but is there some event I can write iRules around that happens just before the bigip routes the packets to the specified pool?
21 Replies
- drteeth_127330Historic F5 AccountI think that's a bug.
- unRuleY_95363Historic F5 AccountYes, that's a bug.
Here, try this rule:when LB_SELECTED { set server_addr [LB::server addr] } when HTTP_REQUEST_SEND { if { $server_addr ne "" } { clientside { HTTP::header replace Host $server_addr } } } - William_Them_99
Nimbostratus
Hmm. No fun. Would it be possible to get around it by putting the iRule into bigip.conf directly? - drteeth_127330Historic F5 AccountThis rule should work:
rule test_rule { when HTTP_REQUEST_SEND { clientside { HTTP::header replace Host [IP::server_addr] } } } - William_Them_99
Nimbostratus
Cool, well, both variations of the rules work, but don't get me the desired behavior with SiteMinder...maybe because the host name is not getting changed between the BigIP and the backend, only from the client the the BigIP? (I assume that's what the "clientside" does).
Thanks for everyone's help here, I appreciate it. - unRuleY_95363Historic F5 AccountHuh!?
Both Dr. Teeth and I tested that the Host: header is changed on server-side of connection (I verified via tcpdump on the server that the Host: header contained the IP of the target node).
The "clientside" simply mean evaluate the command in the braces on the clientside context, which is where the headers are available.
Perhaps, SiteMinder requires the hostname to be a name and not IP address? This would be a bit trickier to do, but could be done with a data group/class mapping table. - Brian_Gupta_115
Nimbostratus
What triggers the HTTP_CLASS_SELECTED event? -Brian - Brian_Gupta_115
Nimbostratus
Is HTTP_CLASS_SELECTED a valid event? I get an error when I try to put it in a rule.
Also, in the following doc: http://devcentral.f5.com/Default.aspx?tabid=29&articleType=ArticleView&articleId=27 [URL]http://devcentral.f5.com/Default.aspx?tabid=29&articleType=ArticleView&articleId=27 [/URL] is "SERVER_SELECTED" supposed to be "LB_SELECTED"?
Thanks,
Brian - Brian_Gupta_115
Nimbostratus
Also what is SERVER_LINE? -Brian - unRuleY_95363Historic F5 AccountWhat triggers the HTTP_CLASS_SELECTED event?This is a new event in 9.2 that gets triggered when an httpclass profile matches (the profile is also new).
is "SERVER_SELECTED" supposed to be "LB_SELECTED"?YUP!
Also what is SERVER_LINE?It's an old event that never made prime-time. It is part of a profile called the line profile which simply parses traffic for CR/LF and fires the CLIENT_LINE or SERVER_LINE events as lines are parsed. We never ended up publishing the line profile. Hopefully it will be there someday...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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