Skip to content

Commit

Permalink
Add x-zip and x-zip-compressed as recognized .zip header mime types (#…
Browse files Browse the repository at this point in the history
…1954)

Fixes #1950
  • Loading branch information
gpeal authored Nov 28, 2021
1 parent 37893c8 commit d884a67
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ private LottieResult<LottieComposition> fromInputStream(@NonNull String url, @No
// in the result which is more useful than failing here.
contentType = "application/json";
}
if (contentType.contains("application/zip") || url.split("\\?")[0].endsWith(".lottie")) {
if (contentType.contains("application/zip") ||
contentType.contains("application/x-zip") ||
contentType.contains("application/x-zip-compressed") ||
url.split("\\?")[0].endsWith(".lottie")) {
Logger.debug("Handling zip response.");
extension = FileExtension.ZIP;
result = fromZipStream(url, inputStream, cacheKey);
Expand Down

0 comments on commit d884a67

Please sign in to comment.