Forum Discussion
Russell_Backer_
Dec 22, 2011Nimbostratus
Stream Expressions
This is the IRule that I have when when HTTP_RESPONSE { if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression @} STREAM::ena...
nitass
Dec 28, 2011Employee
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
stream {}
tcp {}
}
}
[root@ve1023:Active] config b pool foo list
pool foo {
members {
200.200.200.101:80 {}
200.200.200.102:80 {}
}
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
STREAM::disable
}
when HTTP_RESPONSE {
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@http://csweb@https://csweb@ @@http://www\.quantum\.com(?!/ProductAwareTandC\.aspx)@https://www.quantum.com@ @http://maps\.google\.com@https://maps.google.com@}
STREAM::enable
}
}
}
[root@ve1023:Active] config curl http://200.200.200.101/test.html
this is host 101.
http://www.yahoo.com/test
http://csweb/test
http://www.quantum.com(?!http://www.quantum.com/ProductAwareTandC.aspx)/test
http://maps.google.com/test
http://www.f5.com/test
[root@ve1023:Active] config curl http://172.28.19.79/test.html
this is host 101.
http://www.yahoo.com/test
http://csweb/test
http://www.quantum.com(?!http://www.quantum.com/ProductAwareTandC.aspx)/test
http://maps.google.com/test
http://www.f5.com/test
[root@ve1023:Active] config
Dec 28 02:02:30 local/tmm err tmm[26866]: 01220005:3: Can't compile regular expression - (http://csweb)|()|(couldn't compile regular expression pattern: invalid escape \ sequence)|()couldn't compile regular expression pattern: invalid escape \ sequence) (Server side: vip=bar profile=stream pool=foo)
Dec 28 02:02:30 local/tmm err tmm[26866]: 01220001:3: TCL error: myrule - couldn't compile regular expression pattern: parentheses () not balancedIllegal argument (line 2) invoked from within "STREAM::expression {@http://csweb@https://csweb@ @@http://www\.quantum\.com(?!/ProductAwareTandC\.aspx)@https://www.quantum.com@ @http://maps\.google\..."
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