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
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.
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.