Forum Discussion
Sriram_129909
Nimbostratus
Apr 21, 2014iRule to block Excessive cookie size
I need to block some requests that are having excessive cookie header size (more than 8190 bytes). Is there a variable in iRule that would give me the size in bytes?
Kevin_Stewart
Employee
Apr 23, 2014Well, you could technically use the (partially obsolete) string bytelength command:
when HTTP_RESPONSE {
foreach x [HTTP::cookie names] {
log local0. "cookie($x) = [string length $x[HTTP::cookie value $x]]"
log local0. "cookie($x) = [string bytelength $x[HTTP::cookie value $x]]"
}
}
But I venture that the ASCII length is going to be pretty close to the byte length.
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