Forum Discussion
Chad_Roberts_21
Nimbostratus
Aug 23, 2007Memory-resident variable question
I need to write an iRule that will track what cookie values are assigned by the back end servers and to which user IDs and store them for a certain period of time. This is a multi-part problem, and I ...
Deb_Allen_18
Aug 24, 2007Historic F5 Account
1. session command
2. session command
3. Click here
when HTTP_REQUEST {
Don't allow data to be chunked
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
when HTTP_RESPONSE {
if {[HTTP::cookie exists myCookie]}{
trigger collection for up to 1MB of data if cookie exists
if {([HTTP::header exists "Content-Length"]) && ([HTTP::header "Content-Length"] <= 1000000)}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000
}
if { $content_length > 0 } {
HTTP::collect $content_length
}
}
}
when HTTP_RESPONSE_DATA {
grab client ID to use as session table entry key
set clientID [findstr [HTTP::payload] "clientID=" 9 &]
if {$clientID != ""}{
if key value found, add session table entry with 300 sec timeout
session add uie $clientID [HTTP::cookie myCookie] 300
}
}
HTH
/deb
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects