Forum Discussion
TCL error on simple replace header iRule
- 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.
We're running v12.1.4. It only happens every so often so I don't actually know what is causing it. I did wonder if it was something to do with the string replacement. I prefersetting a varaible before the replacement so I'll do that and see if it stops it.
Thanks for your answers.
Sure! let us know if it fixes the issue.
KR,
Dario.
- AnthonyOct 04, 2019Nimbostratus
Quick answer is that its generated the same error.
TCL error: /Common/remove_port <HTTP_REQUEST> - Operation not supported (line 4) invoked from within "HTTP::header replace Host $new_host"
Back to the drawing board...
- 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.
- AnthonyOct 04, 2019Nimbostratus
Thanks Dario, I'll give that a go and see if the errors clear.
- AnthonyOct 07, 2019Nimbostratus
Not had any TCL errors since putting this one in, so looks like its resolved the issue.
Thanks very much for the suggestion Dario!
Regards,
Ant
Recent Discussions
Related Content
* 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