Closed Bug 527992 Opened 15 years ago Closed 15 years ago

file/x-msdownload uploading zip file

Categories

(Firefox :: File Handling, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: confuser, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB5 (.NET CLR 3.5.30729)

When attempting to upload a file via multipart/form-data form enctype, PHP shows the zip file's mime type as file/x-msdownload

Reproducible: Always

Steps to Reproduce:
<?php
if(isset($_POST['upload'])) {
     echo $_FILES['archive']['type'];
}
?>
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="archive" id="archive" />
<input type="submit" value="upload" name="upload" /></form>
Actual Results:  
file/x-msdownload

Expected Results:  
application/x-zip-compressed
You have either a stored entry in tools/options/applications that zip is file/x-msdownload or the windows registry reports tis content-type forthe extension.
Your right, some how I have 2 mime types for zip archives
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
This happens because you downloaded a .zip file and many servers sends the file/x-msdownload content-type for downloads. The content-type is stored if you select that the download decision should be remembered.
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.