Microsoft KB Archive/815455

= Internet Explorer May Not Use the Expected MIME Type for Uploaded Files =

Article ID: 815455

Article Last Modified on 5/23/2007

-

APPLIES TO

 Microsoft Internet Explorer 6.0, when used with:  Microsoft Windows Server 2003, Standard Edition (32-bit x86)

 Microsoft Windows XP Professional

 Microsoft Windows 2000 Standard Edition

 Microsoft Windows NT 4.0 Service Pack 6</li></ul>

 Microsoft Windows Millennium Edition</li></ul>

 Microsoft Windows 98 Second Edition</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul> </li></ul>

-

<div class="symptoms_section">

SYMPTOMS
When you use Internet Explorer to upload (or post) a file to a Web server by using a form on a Web page, the file may not be uploaded with the expected MIME type. (The MIME type is also known as the content type or the media type.) For example, if you upload an .asx file (a Microsoft Windows Media audio or video playlist), a network trace may show that the Content-type header used is &quot;text/html&quot; instead of &quot;video/x-ms-asf.&quot; For example, a typical abstract of a network trace may contain data that is similar to this: <pre class="fixed_text">POST /upload.asp Content-Type: multipart/form-data; ... -7d3376d1b08bc Content-Disposition: form-data; name=&quot;filUpload&quot;; filename=&quot;C:\example.asx&quot; Content-Type : text/html This behavior may be a problem for receiving programs that rely on the Content-type header to process the uploaded file.

<div class="cause_section">

CAUSE
An .asx file is typically a plain-text file that contains XML or HTML tags. A text file that contains any of the following tags is assigned a MIME type of &quot;text/html&quot; by Internet Explorer:

<?XML>

<A HREF>

<BODY>

<HEAD>

<HTML>

<IMG>

<PLAINTEXT>

<PRE>

<SCRIPT>

<TABLE>

<TITLE>

The MIME type that is detected by Internet Explorer for .asx files is frequently &quot;text/html&quot; because .asx files typically contain text and HTML tags such as <TITLE>.

Internet Explorer examines the actual contents that are associated with a local file to determine the MIME type. If the contents of the file do not permit Internet Explorer to determine the MIME type, the file name extension and associations or registered programs are used to determine the MIME type.

<div class="moreinformation_section">

MORE INFORMATION
Form-based file upload in HTML is described in Request for Comments (RFC) document 1867. To view this document, visit the following Internet Engineering Task Force (IETF) Web site:

http://www.ietf.org/rfc/rfc1867.txt

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

For additional information about MIME-type detection in Internet Explorer, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/ms775147.aspx

Additional query words: datasniffing media-type

Keywords: kbprb KB815455

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.