JosephT
Oct 24, 2008Nimbostratus
Help write an irule to check and strip transfer-encoding header
We have a need to inspect all http requests and, if an HTTP request contains a Transfer-Encoding header with a value greater than 64 bytes, then we want to remove the Transfer-Encoding header from the HTTP request
I came up with this:
when HTTP_REQUEST {
if { [HTTP::header exists "Transfer-Encoding"] && [HTTP::header "Transfer-Encoding"] > 64 } {
[HTTP::header remove Transfer-Encoding]
}
}
But it doesn't appear to be working correctly. When testing, if the HTTP request contains a Transfer-Encoding header (of any size), the HTTP request just never makes it through.
Any help would be greatly appreciated. TIA!