Forum Discussion
Rusty_Hale_8009
Nimbostratus
Apr 26, 2005Grab cookie contents and insert it as another.
I want to grab the contents of a cookie (from an http post) and insert that value into a new cookie with a different name. This is what I have so far that will not pass syntax:
when HT...
Apr 27, 2005
Looks like you've got your contents in the POST data which is indeed part of the HTTP payload. Here's some code to collect the full POST data via the Content-Length header and then it uses findstr to search in the payload data for the txtUsername= string.
when HTTP_REQUEST {
set clen [HTTP::header Content-Length]
HTTP::collect $clen
}
when HTTP_REQUEST_DATA {
set authuser [findstr [HTTP::payload $clen] "txtUsername=" 12 "&"]
log "txtUserName Value: $authuser"
}
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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