Forum Discussion

Kevin_Davies_40's avatar
Aug 15, 2011

STREAM *head scratching*

Hello,

 

 

I have a VS setup on port 443 applied to external VLAN using builtin SSL profile on clientside only, http profile (rechunk, x-forwarded), empty stream profile, SNAT pool; points to a pool of web servers on port 80 with an iRule attached as follows. Environment, VLANs, SNAT are well known and working and we are using route domains.

 

 

 

when HTTP_RESPONSE {

 

if {[HTTP::header "Content-Type"] contains "text"} {

 

STREAM::expression {@http://@https://@}

 

STREAM::enable

 

}

 

}

 

 

 

Initial page returns with broken images and the page is full of "http://" links which should have been rewritten as "https://".

 

 

 

Any Help Appreciated!

 

 

 

Kevin

 

 

 

 

 

  • when HTTP_REQUEST { 
      STREAM::disable 
      HTTP::header remove "Accept-Encoding" 
    } 
    

    Turns out this bit of iRule above is necessary to make all this work. However the stream profile @http://@https://@ does not. It had to be modified to @http@https@

    The following expressions have different results... host = hello

    STREAM::expression @http://@https://@ does not work

    STREAM::expression @http://hello@https://hello@ does not work

    STREAM::expression @http://\@https://\@ does work

    STREAM::expression @http://$host@https://$host@ does work

    STREAM::expression @http@https@ does work

    Can anyone explain to me why certain things work and others do not. I would like to understand the parsing that is going on here.

    Regards

    Kevin (Jarvil)
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    That's actually very interesting. I would think that all of those forms would work. When you say "doesn't work" do you mean that it's not replacing the strings, or returning an error of some form?

     

     

    Colin