Forum Discussion
Russell_E_Glaue
Nimbostratus
Feb 18, 2009How to disable iRule processing on keep-alive per request when using HTTP::respond
How to disable iRule processing on keep-alive per request when using HTTP::respond
Okay, I have encountered a problem I cannot figure out how to get around.
Here ...
Russell_E_Glaue
Nimbostratus
Feb 19, 2009Okay, I submitted my feature request.
Here is my proposed changes:
I want to change the syntax for the "event" command.
Currently syntax is:
event [] [enable|disable] | [enable all|disable all]
I propose that the new syntax would be:
event [] [enable|disable|end] | [enable all|disable all|end all]
And basically, this will change the following scenario:
Current procedure for disabling an event for a single request:
1) CLIENT_CONNECT
2) HTTP_REQUEST event HTTP_REQUEST disable
3) HTTP_RESPONSE event HTTP_REQUEST enable
4) HTTP_REQUEST
5) HTTP_RESPONSE
6)
New procedure to get the same exact results:
1) CLIENT_CONNECT
2) HTTP_REQUEST event HTTP_REQUEST end
3) HTTP_RESPONSE
4) HTTP_REQUEST
5) HTTP_RESPONSE
6)
This is useful for functions like HTTP::respond which causes the BigIP to send a response back to the web client, but the HTTP_RESPOSE event is not being executed.
Also useful for HTTP::redirect
rule redirect {
when HTTP_REQUEST {
if { [HTTP::host] equals "yoursite.com" } {
HTTP::redirect http://mysite.com/
event end
return
}
elseif { HTTP::host equals "thatsite.com" } {
HTTP::response 200 content {
We have moved to a new domain.
} noserver
event end
return
}
pool mysite.com_pool
}
}
In the above code (assuming yoursite.com, thissite.com and mysite.com all resolve to the same IP number for the web browser) the keep-alive connection does not have to end in order to get sent to the mysite.com web site from one of the other URLs.
Of course this is a primitive example, this is best used in cases that have more advanced and complex uses that require the keep-alive connection to remain open.
-RG
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