Hi, I'm currently trying to send an uppercase header in my proxy's response, I've tried to use this approach without success
I'm executing this policy in the proxy endpoint response postflow
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="AM-UpperCaseHeaders">
<DisplayName>AM-UpperCaseHeaders</DisplayName>
<Set>
<Headers>
<Header name="THISISMAYUS">Hi</Header>
</Headers>
</Set>
<Add>
<Headers>
<Header name="ANOTHERMAYUS">hi_again</Header>
</Headers>
</Add>
</AssignMessage>
I can see the headers in uppercase in the debug session, however I'm receiving lowercase names in the response
I have the feeling that Apigee is converting the headers to lowercase before sending the response to the client, there is a way to avoid this behavior?
Thanks in advance
Solved! Go to Solution.
Header NAMES are case insensitive. Content-Type
is the same as content-type
is the same as CONTENT-TYPE
is the same as cOnTeNt-TyPe
. See IETF RFC 2616.
Header VALUES are case sensitive.
So, ... it's quite possible that Apigee is normalizing the header names to lowercase, but that should not affect behavior of any compliant system. And if Apigee is doing that, then... there is no good way to turn that off or disable that behavior. If your client app insists on a specific casing for header names, your client application is not compliant with the HTTP specification, and should be fixed!
Header NAMES are case insensitive. Content-Type
is the same as content-type
is the same as CONTENT-TYPE
is the same as cOnTeNt-TyPe
. See IETF RFC 2616.
Header VALUES are case sensitive.
So, ... it's quite possible that Apigee is normalizing the header names to lowercase, but that should not affect behavior of any compliant system. And if Apigee is doing that, then... there is no good way to turn that off or disable that behavior. If your client app insists on a specific casing for header names, your client application is not compliant with the HTTP specification, and should be fixed!
Thanks for the answer! we will talk with our client