Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Durable orchestration with special characters #932

Open
tragopogon opened this issue Mar 20, 2023 · 1 comment
Open

Durable orchestration with special characters #932

tragopogon opened this issue Mar 20, 2023 · 1 comment

Comments

@tragopogon
Copy link

tragopogon commented Mar 20, 2023

We pass the HTTP trigger’s request to the durable orchestrator.
Inside this worker (Start-DurableOrchestration) the request is JSON encoded but forwarded (Invoke-RestMethod) without a charset, so we lose special characters (e.g.: äöüß) in the request.

$null = Invoke-RestMethod -Uri $Uri -Method 'POST' -ContentType 'application/json' -Body $Body

Please change the ContentType parameter to “application/json;charset=utf-8”.
See pull request: #931

To workaround we encode the request with base64 before passing it to Start-DurableOrchestration and decode the Context.Input in the orchestrator before invoking the durable activity. Do you see any negative impacts on the workaround?
Or are we doing it completely wrong and should pass the request in another way to the activity?

@tragopogon tragopogon changed the title durable orchestration with special characters Durable orchestration with special characters Mar 20, 2023
@davidmrdavid
Copy link
Contributor

Hi @tragopogon, thanks for reaching out. This a scenario we had not considered before so thank you for pointing it out. I do think your workaround should be safe, and I would recommend continuing to use it. Given that changing encoding formats may cause unexpected consequences in a multi-component system like ours, I would like to wait before incorporating your PR (which I realize appreciate!) so that we can investigate if it's safe to merge.

In the meantime, I agree that manually encoding and decoding these special characters would be the recommended approach. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants