Forum Discussion
chiewming_15294
Jan 18, 2012Nimbostratus
HTTP Profile "Maximum Header Size"
Hi All,
Our platform is intended to act as a proxy or transparent
proxy to serve ONLY http traffic from handset or laptop. (Non http traffic bypassed at F5 level)
...
chiewming_15294
Jan 19, 2012Nimbostratus
Hi Aaron,
I did some modification on the iRule provided earlier to check only on header size is larger than 65536 bytes else do nothing.
The reason is if http request length more than 10000 doesn't mean it's more than 32 or 64KB. Please correct me if I'm wrong.
Please advice on iRule below:
when HTTP_REQUEST {
set hlength [string length [HTTP::query]]
if { $hlength > 32768 } {
Check the total HTTP headers size
if {[string length [HTTP::request]] > 10000 }{
Check if the URI is very long
if {[string length [HTTP::uri]] > 1000}{
log local0. "Uri is long. Length [string length [HTTP::uri]], URI: [HTTP::uri]"
Exit this event from this iRule
return
}
Loop through the headers by name
foreach header {[HTTP::header names]} {
Check for a long header value
if {[string length [HTTP::header value $header]] > 1000 } {
log local0. "Header is long. Header Name: $header,\
Length: [string length [HTTP::header value $header]], Value: [HTTP::header value $header]"
Exit this event from this iRule
return
}
}
If we are still here the request was large, but not the URI or any single header.
Log the first 1k bytes of the full request
log local0. "Request is long: [HTTP::request]"
}
}
}
Thanks,
chiewming
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