You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.lang.IllegalArgumentException: Unexpected char 0xd83d at 0 in x-amz-meta-custom value: 😏
at okhttp3.internal._HeadersCommonKt.headersCheckValue(-HeadersCommon.kt:140)
at okhttp3.internal._HeadersCommonKt.commonAdd(-HeadersCommon.kt:77)
at okhttp3.Headers$Builder.add(Headers.kt:166)
at okhttp3.internal._RequestCommonKt.commonAddHeader(-RequestCommon.kt:60)
at okhttp3.Request$Builder.addHeader(Request.kt:221)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpUtilsKt$toOkHttpRequest$1.invoke(OkHttpUtils.kt:54)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpUtilsKt$toOkHttpRequest$1.invoke(OkHttpUtils.kt:52)
at aws.smithy.kotlin.runtime.util.ValuesMap$DefaultImpls.forEach(ValuesMap.kt:54)
at aws.smithy.kotlin.runtime.util.ValuesMapImpl.forEach(ValuesMap.kt:69)
at aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpUtilsKt.toOkHttpRequest(OkHttpUtils.kt:52)
Steps to Reproduce
Initiate:
PutObjectRequest {
...
metadata = mapOf("custom" to "😏")
...
}
execute request
Possible Solution
No response
Context
No response
AWS Kotlin SDK version used
All
Platform (JVM/JS/Native)
JVM
Operating System and version
Android
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or 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.
Describe the bug
If PubObjectRequest (likely all other storage request types) metadata contains non-ASCII characters in a header pair, the request will fail.
OkHttp does not accept non-ASCII characters by default and requires adding flag for leniency or https://square.github.io/okhttp/5.x/okhttp/okhttp3/-headers/-builder/add-unsafe-non-ascii.html.
DefaultS3Client appears to use the default OkHttp config not allowing non-ASCII header values.
See report from Amplify v2 for more info: aws-amplify/amplify-android#2657
Expected behavior
Allow non-ASCII characters in header values.
Current behavior
Request never attempted.
Steps to Reproduce
Initiate:
execute request
Possible Solution
No response
Context
No response
AWS Kotlin SDK version used
All
Platform (JVM/JS/Native)
JVM
Operating System and version
Android
The text was updated successfully, but these errors were encountered: