I came across a weird issue while downloading files on Safari browser, the files downloaded from one of my server appended had .zip.html to them instead of .zip as expected, though I could remove the extra .html extension and could access the file, that's a bad idea.
This bug was not reported on other browsers like Internet Explorer, Chrome, or Firefox. Thinking about the cause of it, I was able to guess that it was something related to HTTP request/response header issue: MIME or Context-Type
So I used Inspect Element on Safari to check what the Context-Type was set for the response sent to the server. It was wrongly set as ContentType (hyphen missing) causing this problem. The response had two header parameters ContextType: application/xml and Context-Type: text/html
Maybe other browser's were able to resolve this issue thus not causing this issue.
So its the webserver issue. I hope this helps someone who is facing the same problem.
![safari header context-type safari header context-type](https://code2care.org/pages/safari-appends-html-extension-to-files-that-are-downloaded/images/safari header context-type.png)
- Transfer files between Android and Mac OS X using usb cable
- Find Java JRE Installation location Mac OS X
- How to enable Do Not Disturb mode for Notification Center in Mac OS X 10.10 Yosemite
- Remove Applications from Startup Mac OS X
- Open New tab using keyboard shortcut in Mac Terminal
- Create a large dummy file using Mac OS X terminal command
- Hide files and folders on Mac OS X
- Install Apache Tomcat ver 8 on Mac OS X Yosemite 10.10
- Location of eclipse.ini file on Mac OS X
- Take Screenshots on Mac OS without Keyboard
- [Solved] Dynamic Web Module 3.0 requires Java 1.6 or newer Mac OSX
- Mac OS X Taking Screen Capture using Terminal
- How to Stop Photos App from auto loading when device connected to the Mac
- Change Mouse Scrolling in Mac OS X
- How to Setup maven on Mac (macOS)
- Mac Studio Display Buzzing sound from the Monitor
- 4 Open Source SQLite Editor for Mac OS X , Windows and Linux
- Save webpage as pdf in Google Chrome for Mac OS X
- vi undo redo command [Examples]
- How to See Hidden Folders and Files on macOS
- [Mac] To open Eclipse you need to install the legacy java se 6 runtime
- Java location in Mac OS X
- Safari appends .html extension to files that are downloaded
- Pdf Text to Speech option in Mac OS X Preview App
- How to run Gradle from Mac Terminal (Command Line)
- Cant find System Preferences... under macOS Ventura Apple Menu? - MacOS
- Check Wifi Connection static Android Programming - Android
- Read Java JDBC Connection Details from Properties File - Java
- M365 service Europe outage - AADSTS90033 A transient error has occurred. Please try again. - Microsoft
- Native getClass() method from java.lang.Object Class Explained with examples. - Java
- Mac: How to show count of files and folders in Finder - MacOS
- How to Connect to AWS Windows EC2 UI Instance from M1 Mac (Updated) - HowTos
- Integrating WhatsApp with Android Application using Intent (Java/Kotlin) - Android