Forum Discussion

Dan_123791's avatar
Dan_123791
Icon for Nimbostratus rankNimbostratus
Mar 06, 2015

different Irule behaviour for HTTP_REQUEST vs LB_FAILED

Hi,

 

I have an irule which has a full webpage embedded within it (including an exceptionally long style tag).

 

when I trigger this iRule using

 

when HTTP_REQUEST {

 

then the full webpage is displayed... however if I only modify the first line to

 

when LB_FAILED {

 

The header information is picked up, style tag gets truncated and the rest of the webpage (the body)is not displayed.

 

Please advise what is causing this... am planning to test if same behaviour occurs if I use an iFile for the embedded webpage

 

Thanks

 

4 Replies

  • Just tried using an iFile and same behaviour observed...? Any ideas on this? sounds like a bug
  • Check out SOL9456. I think it may help answer your question. The Applies To only goes up to 11.4, so it me not be an issue on versions past that (in case you plan to upgrade).

     

  • Thanks Michael J, definitely this is some sort of bug but it does not work with the workarounds suggested

     

    Finally landed up using advice from this link: https://devcentral.f5.com/questions/how-to-create-irule-to-deliver-an-alternate-page-response-other-than-page-unavailable

     

    i.e. when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1} { switch [HTTP::uri] { "/guardian_header.jpg" { HTTP::respond 200 content [ifile get "guardian_header_jpg"] } "/guardian_logo.jpg" { HTTP::respond 200 content [ifile get "guardian_logo_jpg"] } default { HTTP::respond 200 content [ifile get "maint_index_html"] } } } }