Forum Discussion

junior_ra_16677's avatar
junior_ra_16677
Icon for Nimbostratus rankNimbostratus
Aug 13, 2014

How do I check if header does not exist ?

Hi,

I know how to check if header exists, but how can I make the irule only check if header exists. If it doesnt I was going add something to the header

if {   [HTTP::header exists "test"] } {

2 Replies

  • you can try something like this

    if {   [HTTP::header exists "test"] } { 
         do something if header exists
    } else {
         if header doesnt exist, insert it
        HTTP::header insert test blahblah
    }