problem with umlaut characters

Not applicable

Hello,

I have a problem calling API with umlauts characters in the request, I get ??? in the header response instead of umlauts characters.

E.g.

Request: http://xxxxxx-nonprod-dev.apigee.net/umlaut?umlaut=öäü

Response: Header umlaut=???

Could you help me to figure out this issue, please?

0 3 655
3 REPLIES 3

AFAIK According to RFC of the HTTP/1.1 it is not possible sending non US-ASCII symbols in the HTTP headers.

Body, on the other hand, should be correctly displayed by the browsers.

"In practice, most HTTP header field values use only a subset of the US-ASCII charset [USASCII]. Newly defined header fields SHOULD limit their field values to US-ASCII octets. A recipient SHOULD treat other octets in field content (obs-text) as opaque data."

https://tools.ietf.org/html/rfc7230#section-3.2.4

I agree but i expect Apigee to encode the values as a whatsoever server would do it. i tried with Nodejs and i see that the header is getting percentage-encoded. Same as the browser does. So why Apigee does not?

thanks

Apigee is encoding response header values as ASCII as per the spec. Any other encoding scheme would be custom and SHOULD ("should" coming from the spec snippet above) be within ASCII octet range.

However you have access to the value as a variable in Apigee (request.queryparam.umlaut). You can encode this however you want as long as the output characters are within ASCII range.