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

Gert Vloo 26 Reputation points
2021-06-23T08:49:42.83+00:00

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,752 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,666 Reputation points Microsoft Employee
    2021-06-29T21:16:59.107+00:00

    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