Forum Discussion

Steve_Brown_882's avatar
Steve_Brown_882
Historic F5 Account
Mar 14, 2008

Stream Breaking Flash Code

Hey Guys,

 

I am workig on moving one of our apps to our new box and have run into sort of a snag. We are using a stream profile to fix user uploaded content. Basically users should be uploading content with refrences to https instead they upload http links. We are using the irule below to resolve the issue. It works great. The issue is we have some flash content on the site and this irule breaks some of the flash content. I think what may be happening is whoever wrote the flash content has some refrence to http://domain. in the flash and the irule tries to change it which in turn breaks it. Does anyone have any thoughts on this? I am using rechunk on the responces...

 

 

 

when HTTP_RESPONSE {

 

STREAM::expression "@http://domain.@https://domain.@

 

STREAM::enable

 

}

2 Replies

  • Hello,

    It would be good to restrict the stream filter to only text content types. The flash content should be "application/something-flash". This avoids checking potentially large binary content that you don't want to perform the replacement for anyhow. If you disable the stream filter by default and add an if statement to enable it for text response types, it should solve the issue you're seeing and make the rule more efficient.

    
    when HTTP_RESPONSE {
        Disable the stream profile by default (so it's not left enabled for subsequent HTTP requests on the same TCP connection
       STREAM::disable
        Check if the response content type is text
       if {[HTTP::header value Content-Type] starts_with "text"}{
          STREAM::expression "@http://domain.@https://domain.@
          STREAM::enable
       }
    }

    Aaron
  • Steve_Brown_882's avatar
    Steve_Brown_882
    Historic F5 Account
    Thanks for the reply. I had started down the road of doing an if not on the the Flash type, but it made more sense to just allow text and that fixed the issue.