Bug in API Management set-header policy when using UTF-8 characters

Gert Vloo 26 Reputation points

Hi, I think I found a bug in APIM set-header policy.

When I use a UTF-8 'dash' (–) character as input for set-header I get the error: "Expression value is invalid. Specified value has invalid Control characters."

The first error is thrown at 11-6-2021 07:01:04.722Z

Are there more people having this problem?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,423 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeUrnun 6,686 Reputation points

    Hello @Gert Vloo

    I have run this by the APIM team and they have confirmed that this is not a bug but an expected behavior that honors the RFC2616 spec for the header value as *TEXT, which is an 8-bit sequence of data excluding control characters: https://datatracker.ietf.org/doc/html/rfc2616#page-16

    I hope this brings clarity and helps you proceed with your project.

    0 comments No comments