Forum Discussion
7 Replies
Sort By
- hooleylistCirrostratusHi Jucao,
- Robert_47833AltostratusHi,dear hoolio
- hooleylistCirrostratusHi Jucao,
when HTTP_REQUEST { Track whether to set a cookie to force use of the cjj1 pool set cjj1_cookie 0 Check if request already has a cookie indicating they should be sent to the cjj1 pool if {[HTTP::cookie value cjj1_cookie] == 1}{ Select the cjj1 pool pool cjj1_pool Exit this event in this rule return } If we got here, request did not have a pool selector cookie if {[class match [HTTP::uri] starts_with cjj1_uri_class]}{ if { rand() < 0.20 } { Select the cjj1 pool pool cjj1_pool Track whether to set a cookie to force use of the cjj1 pool set cjj1_cookie 1 } Default action if a pool was not selected above will be to use the VS default pool } } when HTTP_RESPONSE { Check if request was for a cjj1 URI if { $cjj1_cookie == 1 }{ Insert a session cookie in the response HTTP::cookie insert cjj1_cookie value 1 path "/" } }
- Robert_47833AltostratushI,I have worked out,but still need to confirm with u in some details
- hooleylistCirrostratusIf you set an expire time of something other than 0 on the cookie it should be saved by the client on the filesystem and sent on each request until it expires. If you don't set an expire time or set it to 0, then the client should store it in memory and not send it after the browser is closed.
- hooleylistCirrostratusIf you set an expire time of something other than 0 on the cookie it should be saved by the client on the filesystem and sent on each request until it expires. If you don't set an expire time or set it to 0, then the client should store it in memory and not send it after the browser is closed.
- Robert_47833AltostratusHi,Hoolio