While the HTTP spec may be case insensitive, NiFi Expression Language (EL) is case sensitive.
Are we talking about an undefined number of unique header case sensitivity here?
I would think you have a short defined list of possible header values here, correct?
There are multiple EL functions you can use here:
In above if subject "http.headers.x-My-Header" does not exist on the FlowFile it returns the value from "http.headers.x-my-header" attribute instead; otherwise it returns value from "http.headers.x-My-Header". Then you can continue the EL statement to do whatever additional manipulation needed.
In above it uses a case insensitive Java regular expression within the "AllMatchingAttribtes( )" EL function to return values from all FlowFile attributes that satisfy that regex and then use the "join( )" function to merge them all together. Since we expect that only one attribute will actually match, the result is just a single value. This may be best option.
In above we chain multiple "replaceNull( )" functions to iterate through all case permutations till we find one that exist as an attribute on the FlowFile.
Note: In any of the above you would replace that last ":...." with the rest of your EL statement fucntions needed to manipulate the subject returned as you need.
Options 1 and 3 require you to know all case permutations that may exist.
Option 2 may be best choice as you do not need to know all the permutations, but can be an issue if for some reason you have multiple permutations of the same attribute on the same FlowFile.
Hope this helps,