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

The image filename has chinese, load failed. #1467

Closed
xilost opened this issue Sep 19, 2022 · 0 comments · Fixed by #1468
Closed

The image filename has chinese, load failed. #1467

xilost opened this issue Sep 19, 2022 · 0 comments · Fixed by #1468

Comments

@xilost
Copy link

xilost commented Sep 19, 2022

Describe the bug
The image filename has chinese, load failed.

To Reproduce
this image url https://file.hd.weibo.com/isale/content/16633155108051079889028/微信图片_20220211104359.jpg

Logs/Screenshots
java.lang.IllegalArgumentException: Unexpected char 0x87ba at 23 in content-disposition value: attachment; filename="螺狮粉.png"
at okhttp3.Headers$Companion.checkValue(Headers.kt:450)
at okhttp3.Headers$Companion.access$checkValue(Headers.kt:362)
at okhttp3.Headers$Builder.add(Headers.kt:261)
at okhttp3.Headers$Builder.add(Headers.kt:253)
at coil.network.CacheResponse.(CacheResponse.kt:28)
at coil.fetch.HttpUriFetcher.toCacheResponse(HttpUriFetcher.kt:255)
at coil.fetch.HttpUriFetcher.fetch(HttpUriFetcher.kt:55)
at coil.intercept.EngineInterceptor.fetch(EngineInterceptor.kt:165)
at coil.intercept.EngineInterceptor.execute(EngineInterceptor.kt:122)
at coil.intercept.EngineInterceptor.access$execute(EngineInterceptor.kt:41)
at coil.intercept.EngineInterceptor$intercept$2.invokeSuspend(EngineInterceptor.kt:75)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Version
2.2.0

addUnsafeNonAscii replace add.

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

Successfully merging a pull request may close this issue.

1 participant