iRule Events where STREAM::enable is Allowed
Does anyone have a definitive list of iRule events where STREAM::enable can be used? I've been trying to use it in a clientside context in the HTTP_REQUEST_SEND rule, but it doesn't seem to have any effect.
What I'm trying to do here is to take action based on the result of an ICAP server (integrated with a request adaptation profile), but ignore the actual content ICAP returned. I'd like to modify the original request instead with a Stream profile.
From what I can gather, ADAPT_REQUEST_RESULT fires after HTTP_REQUEST (the iRules order page doesn't have the ADAPT events), so I'm left with a limited number of events where I can modify the request. I've tried both HTTP_REQUEST_SEND and HTTP_REQUEST_RELEASE, but neither seems to actually execute the STREAM::enable command.
Here's an excerpt of my iRule:
when HTTP_REQUEST {
STREAM::disable
... snip ... some standard, non-stream related commands
}
when ADAPT_REQUEST_RESULT {
if { [ADAPT::result] equals "bypass" } {
set need_stream 0
} else {
set need_stream 1
reset result to bypass to ignore response from ICAP server
ADAPT::result bypass
}
}
when HTTP_REQUEST_SEND {
if { $need_stream == 1 } {
clientside {
HTTP::uri "/rewritten/uri"
STREAM::expression {@FIND@REPLACE@}
STREAM::enable
}
}
}
Thank you in advance for any suggestions.