I solved my situation, this is not an AFNetwork problem, I use invalid SSL and SDWebImage certification, when I use the "SDWebImageAllowInvalidSSLCertificates" option in SDWebImage and get an http image (not an https image), you will get this error. protocol (http or https) is not automatically recognized by SDWebImage.
my solution: I do not change the SDWebImages code, I just write a wrapper for the recognized protocol (http or https). I use the "0" parameter for http images and the "SDWebImageAllowInvalidSSLCertificates" parameter for https images (my https certification is self-signed or invalid). If your certificate is valid, I think SDWebImage works well.
kun wang
source share