Forum Discussion
hooleylist
Oct 24, 2008Cirrostratus
Hi there,
If you add logging you could see in /var/log/ltm that [HTTP::header "Transfer-Encoding"] will return the value of the header. If you want to get the length of the header value you could use string length (Click here). Also, you should be getting a TCL error about an unknown command from this line:
[HTTP::header remove Transfer-Encoding]
The square braces act like backticks in *nix, executing the code within. HTTP::header remove will return 0 or 1 depending on whether it runs successfully. So the braces would be executing 1 which isn't a valid command.
This should work:
when HTTP_REQUEST {
if { [HTTP::header exists "Transfer-Encoding"] && [string length [HTTP::header "Transfer-Encoding"]] > 64 } {
HTTP::header remove Transfer-Encoding
}
}
Aaron