Forum Discussion
Help deleting header name that contains curly braces
- Nov 18, 2022
I think I just figured it out guys Mohamed_Ahmed_Kansoh CA_Valli
Paste this and run it. It worked out for me. Now any of you can explain why this works?? Is this a bug with F5? At least it seems to me. If it is, how can I let them know so they can fix it.
when HTTP_REQUEST { if { [HTTP::uri] eq "/demo2" } { HTTP::header insert "{esbsoapheader}userName" "spencer" foreach aHeader [HTTP::header names] { log local0. "HTTP Request Headers: $aHeader: [HTTP::header value $aHeader]" } log local0. "***************REMOVING BAD HEADER************" HTTP::header remove "\\{esbsoapheader\\}userName" foreach aHeader [HTTP::header names] { log local0. "HTTP Request Headers: $aHeader: [HTTP::header value $aHeader]" } } }
CA_Valli Do you know why it is not possible to remove "{esbsoapheader}userName"? Is it because the header name is using characters that are not legal to use in a header name? If so, do you have some resource that I can read to confirm?
it does not work with me ,
I meant the iRule script is correct and accepted , I thought you have a problem with that.
No I have performed your script on my test lab and I saw the TCL error:
Let me see how can I remove it , if I found a workaround , definitely I will share it with you
Regards
- Nov 18, 2022
Spencer_Aranda ,
you are right ,
the issue exactly with remove and {} , I replaced {} with // and it works well.
I think you must change the inserted header and not use {}.
I tried to put this header in variale , and delete this variable but without Luck.
what a strange thing !!
why irule executed well without errors , and couldn’t perform the task of delete.
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