Open vody opened 5 months ago
@ajkauffmann has agreed to include this in a pull request he is working on anyway 🥳 I cannot assign it to him (seems I can only assign to people who have been active on the issue), but consider it assigned 😉
I'm active now. 😊 Yes, happy to take this one!
And now I could assign you 🥳
@ajkauffmann thank you for picking this one. We tried to use it internally to promote open-source contribution within an organization but it was pushed down in priority.
Is this issue fixed, because i have the same issue when i try to use a secretbody with Application/JSON as content-type.
If requesting support, please provide the following details to help troubleshooting:
Error message: Cannot add value because header 'Content-Type' does not support multiple values.
Internal session ID: 501f404a-de0f-4dcf-aba3-6e58cd54fd3b
Application Insights session ID: 04d49ecd-dce5-4254-8280-4c7cfb6f8f21
Client activity id: dcade827-4d0e-4725-8da6-d7b7f983ade0
Time stamp on error: 2024-10-25T08:02:59.2329934Z
User telemetry id: 8359f88c-83b9-4270-bc5a-b420f5a31509
AL call stack: "Http Content Impl."(CodeUnit 2355).SetHeader line 12 - System Application by Microsoft "Http Content Impl."(CodeUnit 2355).SetContentTypeHeader line 4 - System Application by Microsoft "Http Content Impl."(CodeUnit 2355).SetContent line 6 - System Application by Microsoft "Http Content"(CodeUnit 2354).SetContent line 2 - System Application by Microsoft "Http Content"(CodeUnit 2354).Create line 2 - System Application by Microsoft
Yes, a PR will be created next week!
Thank you for the Solution, this is just a major issue because i have a Customer who needs this solution ASAP and security is key.
You can always use a workaround by creating a HttpContent object with the correct and use it with HttpContent.Create(HttpContent). Then you don't have to wait for the PR to be approved and backported to v25.
Describe the issue
The "Http Content" codeunit throws an error message when content is defined from SecretText.
This happens because inside "Http Content Impl.".SetHeader procedure
Headers.Contains(Name)
condition will return false for a secret header, which will be automatically created when we set a content from the SecretText value.Expected behavior
Content will be defined with a new header without error.
Steps to reproduce
Additional context
No response
I will provide a fix for a bug