Forum Discussion
Anthony
Sep 27, 2019Nimbostratus
TCL error on simple replace header iRule
I'm getting a TCL error from a very simple iRule and cannot understand what scenario would cause it to fail. The iRule does a simple port removal from the host header. when HTTP_REQUEST
{
...
- Oct 04, 2019
Try this.
when HTTP_REQUEST { if { [HTTP::host] contains ":" } { log local0. "[HTTP::host] becomes [getfield [HTTP::host] {:} 1]" HTTP::header replace Host [getfield [HTTP::host] {:} 1] } }
KR,
Dario.
James_Thomson
Oct 02, 2019Employee
What version are you running? Also, how were you testing? I just loaded that irule on a 14.1 box and I sent traffic through without a problem.
However, I couldn't get it to log an HTTP::host with the colon in it. I created a line to only log HTTP::host and it only puts the domain name, not the colon.
So, just curious which client you're using to test.
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