Actually, I'm not sure that setting the path in the HTTP_REQUEST event will work as the cookie hasn't been inserted yet. If you're able to test, and it doesn't work in HTTP_REQUEST, can you try setting the path in HTTP_RESPONSE?
To do so, you could set a path variable in the switch and then reference that in the HTTP_RESPONSE event:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
/cc/* {
set path cc
do other things
}
rest of switch checks
default {
set path none
do other things
}
}
}
when HTTP_RESPONSE {
if {HTTP::cookie exists $path}{
HTTP::cookie path $path "/$path"
}
}
Aaron