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
Describe the bug
When a disk cached image includes header values that are non-ASCII, updating the disk cache after a 304 Not Modified fails with an exception which causes image loading to fail.
I also have a fix for this, which I'll submit shortly, but here's the details of the issue below.
When the max-age expires 1 day later (or the disk cached max-age is modified to say 60s), a new server request is sent which returns a 304. However Coil fails as follows:
2023-08-07 16:59:00.454 22744-23063 okhttp.OkHttpClient com.*** I --> GET https://just-eat-prod-eu-res.cloudinary.com/image/upload/c_fill,g_center,h_400,w_500/v1/experiments/projecticing/es/cuisine-icons/alimentaci%C3%B3n.webp
2023-08-07 16:59:00.706 22744-23063 okhttp.OkHttpClient com.*** I <-- 304 https://just-eat-prod-eu-res.cloudinary.com/image/upload/c_fill,g_center,h_400,w_500/v1/experiments/projecticing/es/cuisine-icons/alimentaci%C3%B3n.webp (251ms)
2023-08-07 16:59:00.736 22744-22744 RealImageLoader com.*** I 🚨 Failed - https://just-eat-prod-eu-res.cloudinary.com/image/upload/c_fill,g_center,h_400,w_500/v1/experiments/projecticing/es/cuisine-icons/alimentaci%C3%B3n.webp - java.lang.IllegalArgumentException: Unexpected char 0x301 at 29 in content-disposition value: inline; filename="alimentación.webp"
Logs/Screenshots
Stack as follows points to issue within CacheStrategy.combineHeaders():
…ude non-ASCII characters (#1839)
* Add failing test for #1838
* Fixes loading from disk cache when cached headers contain non-ASCII characters #1838
Allows disk cache headers to be updated after a 304 Not Modified, as detailed in #1838
* Fix deprecated diskCache method call
---------
Co-authored-by: Dave Jones <[email protected]>
Describe the bug
When a disk cached image includes header values that are non-ASCII, updating the disk cache after a 304 Not Modified fails with an exception which causes image loading to fail.
I also have a fix for this, which I'll submit shortly, but here's the details of the issue below.
To Reproduce
Example image: https://just-eat-prod-eu-res.cloudinary.com/image/upload/c_fill,g_center,h_400,w_500/v1/experiments/projecticing/es/cuisine-icons/alimentaci%C3%B3n.webp
Returns headers which are correctly persisted to the disk cache as follows:
When the max-age expires 1 day later (or the disk cached max-age is modified to say 60s), a new server request is sent which returns a 304. However Coil fails as follows:
Logs/Screenshots
Stack as follows points to issue within CacheStrategy.combineHeaders():
Version
2.3.0, but have also reproduced on latest main.
The text was updated successfully, but these errors were encountered: