Mimetype set in the return value of AsyncRequestBody.fromString(String string, Charset cs) ignores Charset.
Describe the bug
SSIA
Expected Behavior
text/plain; charset=${input} is set.
Current Behavior
text/plain; charset=UTF-8 is always set.
Reproduction Steps
Execute the following code https://github.com/aws/aws-sdk-java-v2/blob/2879b9581a5c4427665ce111478c81d0630cbb71/core/sdk-core/src/main/java/software/amazon/awssdk/core/async/AsyncRequestBody.java#L117-L127
Possible Solution
Set appropriate values from input.
Additional Information/Context
No response
AWS Java SDK version used
2.17.264
JDK version used
unrelated
Operating System and version
unrelated
Hello @k163377 ,
Thank you very much for your submission. The team is currently reviewing the behavior you are experiencing. I will update you on the status of this issue here.
Best,
Yasmine
Hello @k163377 ,
The team would like to know what is your use case and how this limitation is impacting you. Could you please provide this information?
Thank you very much for your time and collaboration. Sincerely,
Yasmine
The use case is to upload information with a charset other than UTF-8, as reported.
If the wrong charset is set here, the original charset information will be lost. This value is also set in HTTP headers and so on. This means that all systems accessing this file may try to read it with the wrong charset.
This behavior is undesirable, since charset other than UTF-8 is in common use worldwide.
Hello @k163377 ,
I have transferred this information to the team, I will post all updates regarding this issue here. Thank you very much for your rapid response and collaboration.
Sincerely,
Yasmine
Fix merged, and will be go out with the next SDK release.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.