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

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

Article ID : 949197
Last Review : March 5, 2008
Revision : 1.1

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.

Character Name
< 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


APPLIES TO
• Windows Internet Explorer 7

Back to the top

Keywords: 
kbexpertiseinter kbtshoot kbprb KB949197

Back to the top

 

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image