Forum Discussion
mr_skater99_640
Nimbostratus
Mar 03, 2010Stripping Cookies
We have an off the shelf product that sets to many cookies and cookies on all domains configured in the product (these aren't needed). We're trying to tidy some of this up and we've got some of it wo...
Craig_Jackson_2
Nimbostratus
Nov 01, 2012I did end up using regsub to strip the quotes from the string returned by [HTTP::cookie names] before using it as a list.
The difference between my test and yours is that my cookie name had text after the quote. I tested with
Cookie: "foo":=bar
However, it seems like the list may be being interpreted one too many times. Maybe I'm misunderstanding Tcl, but I think the results of a list command should be able to be used as a list even though the list has invalid members.
Whether or not that's a valid cookie name is irrelevant. We need to anticipate that invalid things will be transmitted from clients.
Note that I don't know exactly what the invalid list entry is, nor the client IP, because neither is being logged. I know I could probably find both pieces of information using catch, but I really don't want to release debugging code on a production box. :-)
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