BZ1034030 : 0 byte local cache file in UrlResource (cheery-picked from 05196fa8d56043cb2ce56db952d4fae17b29f27e)