Forum Discussion

tony_haynes_247's avatar
tony_haynes_247
Icon for Nimbostratus rankNimbostratus
Sep 30, 2011

HTTP::cookie insert not working

version 10.2

This is a very light weight version of my rule. Basically what I need is to set cookie using a source address list.

The matchclass works perfect, but I am not getting any cookies sent to the client.

IE http watch and FF developer tools both show no cookie being sent by the F5.


when HTTP_REQUEST { 
log local0.info "IP address is [IP::client_addr]" 
} 
when HTTP_RESPONSE { 
set tmp_IP [IP::client_addr] 
log local0.info "$tmp_IP" 
if {[matchclass $tmp_IP equals webapp_pilot] }{ 
HTTP::cookie insert name pcookie value y 
log local0.info "match" 
} else { 
HTTP::cookie insert name pcookie value n 
log local0.info "no match" } }

1 Reply

  • Try setting a path in the cookie set:

     

     

    HTTP::cookie insert name pcookie value y path /

     

     

    And then test with curl:

     

     

    curl -v http://1.1.1.1

     

     

    Aaron