-
Notifications
You must be signed in to change notification settings - Fork 45
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
moa.MoaError.notAnImageContentTypeInResponseHttpHeader #18
Comments
Thanks for reporting @hajjarjoseph. Could you share an image URL that's causing this issue, so I can reproduce the problem? |
Yes please try this : url |
(It was working fine before migrating to swift 4.2) |
Hi, the "Content-Type" response header value for this URL is "application/octet-stream" instead of "image/jpeg". Moa checks the content type before showing the image to make sure the data received is actually an image. This is why it throws One can check the repose headers with the
Let me know if it helps. :) |
I am also facing the same issue. If you try to use moa from xcode 10.3 the same image works okay but fails to work in xcode 11. |
Just to give a quick summary of the issue :
}` in the above function in class MoaHttpImage.swift To fix it I added "application/octet-stream" to the list of mime and everything is working okay for now. |
@Aviral190694, thanks for researching this. It looks like Apple has made some changes that broke moa for those MIME types. From iOS 13 Release Notes:
I've whitelisted |
@evgenyneu glad I can help. |
Getting this error while trying to load certain images ( some work, other don't )
moa.MoaError.notAnImageContentTypeInResponseHttpHeader
Library setup method: CocoaPods.
Version of the library: 11.0.1
Xcode version: 11.1
OS version. Example: iOS 13.0
The text was updated successfully, but these errors were encountered: