Currently the code does * GET to the source to get the content distribution header, which I assume will also start (and maybe finish) pulling the file from the source * Inspects the content-distribution header to get the file name * Otherwise gets the name from the URL * does another GET to the source using wget to download the file. Instead * Use a temporary file name like a UUID * Download the file * Figure out the filename as above * rename the file Result: 1 less GET