Forum Discussion
npmaslow_68104
Jun 25, 2009Historic F5 Account
Irule applied stream profile and URLs in comments - any thoughts?
This is more of a general TCL quesiton than an irule question, but it involves the selective application of the stream profile in an irule.
Here is the general form of the irule:
when HTTP_RESPONSE {
if { [HTTP::header Content-Type] starts_with "text/" }{
STREAM::expression
"@http:\u002f\u002fstuff.corp.net@https:\\u002f\\u002f
stuff.corp.net@"
STREAM::enable
log local0. "Streaming enabled for [HTTP::host]"
} else {
STREAM::disable
log local0. "Streaming NOT enabled for [HTTP::host]"
}
}
It works just fine for standard HTTP http to https stream translations, however when faced with a URL within a comment, it does not work, for example:
Are escaped text parts of an HTTP stream 'valid' to a stream profile? Thanks in advance for your thoughts.
- hoolio
Cirrostratus
The stream filter should operate against the entire body of the HTTP if the stream filter is enabled. What is the content type for the Javascript? Do you see the stream filter being enabled for the Javascript response? - npmaslow_68104Historic F5 AccountHello,
- hoolio
Cirrostratus
Did you have a question? - CharlesCS
Cirrus
As a follow-on, I believe the question is: - hoolio
Cirrostratus
If you're trying to match the literal \u002f you should be able to wrap it in curly braces to prevent interpretation of the characters: - hoolio
Cirrostratus
Actually, I think that is the issue you're trying to avoid... - CharlesCS
Cirrus
Unfortunately, the following iRule still does not appear to be detecting the "\u002f" sequence correctly:when HTTP_RESPONSE { STREAM::disable STREAM::expression "@http:{\\u002f\\u002f}pl2pass\.allegistest\.net@@" STREAM::enable } when STREAM_MATCHED { log local0. "[IP::client_addr]:[TCP::local_port]: matched: [STREAM::match], replaced with: [string map {http: https:} [STREAM::match]]" STREAM::replace "[string map {http: https:} [STREAM::match]]" }
- hoolio
Cirrostratus
I don't have too much time to test this at the moment. You might try opening a case with F5 Support to see if they have any suggestions. - hoolio
Cirrostratus
That said, do either of these work? - CharlesCS
Cirrus
Neither of those worked.
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