Forum Discussion

Larry_Altomare_'s avatar
Larry_Altomare_
Icon for Nimbostratus rankNimbostratus
Oct 30, 2013

HTTP::header insert - Cannot insert header with an underscore in the name

Hi,

 

I have a requirement to insert a header field that has a name containing an underscore. When the field name of the header contains an "_", the header does not get inserted.

 

The code below does not insert the request header:

 

modify rule rule_set_is_ssl_hdr { when HTTP_REQUEST { if { [TCP::local_port] == 443 } { HTTP::header insert IS_SSL "1" } else { HTTP::header insert IS_SSL "0" } } }

 

However this code does insert the request header.

 

modify rule rule_set_is_ssl_hdr { when HTTP_REQUEST { if { [TCP::local_port] == 443 } { HTTP::header insert IS-SSL "1" } else { HTTP::header insert IS-SSL "0" } } }

 

How do I insert a header with a field name containing an "_".

 

Thanks, Larry