Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Certain characters in a file name may be converted to underscores when a user downloads a file by using Windows Internet Explorer 7


View products that this article applies to.

Symptoms

When a user visits a Web site that you own, and the user downloads a file by using Windows Internet Explorer 7, the user may find that certain characters in the file name are converted to underscore characters (_) after they download the file.

This problem occurs when any of the following characters are in the file name.
CharacterName
<Left angle bracket
>Right angle bracket
\Backslash
"Quotation mark
/Slash mark
:Colon
|Vertical bar
?Question mark
*Asterisk
Space

↑ Back to the top


Cause

This problem occurs because the Wininet.dll file resolves certain file stream issues when users download files by using Internet Explorer 7.

↑ Back to the top


Resolution

To resolve this problem, do not use "Content-Disposition: Attachment; filename=" HTTP header.

↑ Back to the top


More information

If a file name in this header contains a certain special characters, the cache code calls the CreateFileA() method on that name. If you use the NTFS file system, an alternative stream is created. Then, the WinInet.dll file writes only to the alternative stream.

When a cache entry is committed, the file name is included in the cache entry. Because the CreateFileA() method on the named stream works, the WinInet.dll file does not generate an error. Instead, it uses a random name. Therefore, when the cache entry is retrieved, and the caller tries to open the file, the open operation fails because WinInet.dll file tries to open the FileName file. Instead, the WinInet.dll file must open the FileName:$DATA file.

Therefore, you cannot cache or download content when the Content-Disposition file name token contains a file name that uses one of the special characters that are listed in the "Symptoms" section. The new version of the WinInet.dll file resolves this problem by checking for these characters and replacing them with an underscore character.

↑ Back to the top


Keywords: KB949197, kbprb, kbtshoot, kbexpertiseinter

↑ Back to the top

Article Info
Article ID : 949197
Revision : 3
Created on : 9/28/2011
Published on : 9/28/2011
Exists online : False
Views : 311