Zuke_254875
Jul 19, 2017Altostratus
Issues modifying XML content with stream profile & iRule
I've taken an iRule from another DevCentral post and modified it to fit my application.
when HTTP_REQUEST {
Disable the stream filter for all requests
STREAM::disable
LTM does not uncompress response content, so if the server has compression enabled
and it cannot be disabled on the server, we can prevent the server from
sending a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if response type is text
if {[HTTP::header value Content-Type] contains "text/xml"}{
Replace http:// with https://
STREAM::expression {@http:\\/\\/applicationdomain@https:\\/\\/applicationdomain@}
Enable the stream filter for this response only
STREAM::enable
}
}
The stream profile is successfully replacing the HTTP: with HTTPS:, but is also including the additional backslash and a Silverlight (smh) error pops up
When I remove the second backslash in the iRule, the HTTP: is no longer replaced with HTTPS:, and I'm back to square one.
Any ideas on what I might be doing wrong? Thanks in advance!