Azure / Azure/Azure-Functions

HttpRequest.Headers.TryGetValue Encoding Bug.

Open
#2,428 1 comment 0 reactions 1 assignee Claimed by @bhagyshricompany View on GitHub
Needs: Author feedback
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

When the client enters Japanese or Korean characters in request.Headers.TryAddWithoutValidation and sends them to Azure Funciton, they are converted to strange characters.
However, it is processed normally on the local development PC.
Why does Japanese or Korean look strange only on my Azure Function server?

public static async Task Run([HttpTrigger(AuthorizationLevel.AuthLevelValue, "get", "post", Route = null)]HttpRequest req, TraceWriter log)
{
if(req.Headers.TryGetValue("Team", out var team) )
{
Debug.WriteLine(team) //
}
}

Client Input Value : ラインシステム
Azure Function (Azure Online Server) Debug Result : %C3%A3%C2%83%C2%A9%C3%A3%C2%82%C2%A4%C3%A3%C2%83%C2%B3%C3%A3%C2%82%C2%B7%C3%A3%C2%82%C2%B9%C3%A3%C2%83%C2%86%C3%A3%C2%83%C2%A0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.