Thanks for reporting this. I've found and fixed it in the current release.
You can patch it by finding this function in includes/class.file.php:
static function loadByFullUrl($fileUrl)
Then replace the first line:
$fileUrl = str_replace(array('http://', 'http://'), '', strtolower($fileUrl))...