I'm using ASIHTTP in my iOS app to download a queue of images. The problem is that under bad 3g connections sometimes the image download will fail and you will get a partially downloaded image (with the rest of the image being gray).
Now the question:
I'm getting from my webserver in the HTTP Headers the content-length value. Is this value going to be the correct size of the whole image, so I can verify against this the downloaded image, or if the connection is interrupted the content-lenght will only include the bytes that where downloaded at that moment, meaning I can't verify this way if the image was downloaded complete?