I had a friend trying to download the IOS 7.1.2 image for his iPhone 4 (which he’d just about bricked installing IOS8 on) and was having a weird issue.
It looks like if the server sends the content-type “application/octet-stream” it’ll try to download it with the extension .zip instead of the original extension. This is because of MIME sniffing, which only reads the first 200 bytes of the file to try and guess - rather than just trusting the server and not being a tool about it.
IPSW files look to be PKzip compressed - similar to how Office 2007+ files are - which tricks it into thinking it’s a zip 🙁