Forum Discussion
Jad_Tabbara__J1
May 23, 2017Cirrostratus
Hello Yaniv,
try this
set nTEST [HTTP::header count "TEST"]
if { $nTEST eq "0" } {
log local0. "Nothing to do => No TEST header found"
} else {
set TESTValueList [HTTP::header values "TEST"]
set firstloop 0
foreach TESTValue $TESTValueList {
if { $firstloop eq "0"} {
HTTP::header remove "TEST"
}
if { $TESTValue eq "c"} {
nothing to do
log local0. "Removed -> TEST: $TESTValue"
} else {
HTTP::header insert TEST $TESTValue
log local0. "Inserted -> TEST: $TESTValue"
}
set firstloop 1
}
}