Hi eLeCtRoN do you also have a header named XXX#YYYY? If not, then that's going to be an empty value anyway. If you are trying to:
- Assure the x-id header exists
- Assure that the x-id header has a value
Then, something like this should work for you:
when HTTP_REQUEST priority 500 {
if { [HTTP::header exists x-id] && ([HTTP::header x-id] == "") } {
HTTP::header replace x-id "some value here"
} else {
HTTP::header insert x-id "some value here"
}
}
if you don't need the header to be there then you can eliminate the else statement altogether.