Forum Discussion

Carlos_Alperin's avatar
Carlos_Alperin
Icon for Nimbostratus rankNimbostratus
Feb 21, 2017

HTTP::header

I have issues implementing class match on [HTTP::header "User-Agent"] contains "Mobile-Agents" DataGroup.

 

I have LTM v11.5.4 and it seems that it reset the request all the time.

 

I have a URI where all the request supposed to go, but it works only with notebooks or PC, but not mobiles.

 

Then I implemented the second iRule for http header inspection and redirection, but it resets all request.

 

Any ideas?

 

3 Replies

  • iRule shouldn't be reseting connection unless explicitly specified to do so. I would recommend trying to utilize CURL to see if the iRule function is as expected. If possible, provide your iRule and any error you may be seeing in the logs. You can also try and use K13223 to identify ther RST reason.

     

  • You're always able to insert a Connection: Keep-Alive header in the response...

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Would the following be what you are really after:

    when HTTP_REQUEST {
        if { [class match [HTTP::header "User-Agent"] contains Mobile-Agents] or [HTTP::path] equals "/"} {   
            HTTP::redirect "https://xxxxx.com/zzzzapp"
        }
    }
    

    ?