Why IE force files with PKG extension to download as ZIP

D

Dario de Judicibus

I have several compressed files in a site of mine with extension PKG. They
should be downloaded as is, but when my users try to do it, IE changes the
extension to ZIP. Why????
 
R

Robert Aldwinckle

Dario de Judicibus said:
I have several compressed files in a site of mine with extension PKG. They
should be downloaded as is, but when my users try to do it, IE changes the
extension to ZIP. Why????

Check the MIME type. If it is in the TIF you can browse the
Content.IE5\index.dat and find the file's Content-Type in there.

To turn off that type of file type recognition (aka MIME sniffing)
there is an option in the Security Settings dialog Custom Level...
settings, Miscellaneous section:
Open files based on content, not file extension
Try toggling that to see if you like the other behaviour any better.


Good luck

Robert Aldwinckle
---
 
D

Dario de Judicibus

Robert said:
To turn off that type of file type recognition (aka MIME sniffing)
there is an option in the Security Settings dialog Custom Level...
settings, Miscellaneous section:
Open files based on content, not file extension
Try toggling that to see if you like the other behaviour any better.

Robert, I cannot find that option in Security
Settings->Custom->Miscellaneous. I found the section, but NO reference to
MIME sniffing there. Is it elsewhere in IE6? By the way, once I found the
option, should I reccommend all my users to do the same? Is there any way to
change HTML to add some IE6 only attribute to prevent that?

DdJ
 
D

Dario de Judicibus

Robert said:
Check the MIME type. If it is in the TIF you can browse the
Content.IE5\index.dat and find the file's Content-Type in there.

To turn off that type of file type recognition (aka MIME sniffing)
there is an option in the Security Settings dialog Custom Level...
settings, Miscellaneous section:
Open files based on content, not file extension
Try toggling that to see if you like the other behaviour any better.

P.S. Note that even if I modified HTML code by adding type attribute, IE6
seems to ignore it!!!

<a href="myfile.pkg" type="application/x-pkg">MyFile.pkg</a>

DdJ
 
A

Alan Edwards

Robert, I cannot find that option in Security
Settings->Custom->Miscellaneous. I found the section, but NO reference to
MIME sniffing there. Is it elsewhere in IE6? By the way, once I found the
option, should I reccommend all my users to do the same? Is there any way to
change HTML to add some IE6 only attribute to prevent that?

DdJ

Please look again and forget the "MIME sniffing" reference.

As Robert said:
Security Settings dialog Custom Level... settings, Miscellaneous
section:
"Open files based on content, not file extension"

....Alan
 
D

Dario de Judicibus

Alan said:
Please look again and forget the "MIME sniffing" reference.

As Robert said:
Security Settings dialog Custom Level... settings, Miscellaneous
section:
"Open files based on content, not file extension"


There is not. I suspect it's only in SP2. I did not installed it because
decreased significantly Windows performances. On the other hand, applying
security patches and using a good firewall and antivirus is safe anyway.

By the way, it looks like IE6 does NOT honor type attribute. I changed my
code to

<a href="myfile.pkg" type="application/x-pkg">MyFile.pkg</a>

but I got no result... :(

DdJ
 
R

Robert Aldwinckle

Dario de Judicibus said:
P.S. Note that even if I modified HTML code by adding type attribute, IE6
seems to ignore it!!!

<a href="myfile.pkg" type="application/x-pkg">MyFile.pkg</a>


Sorry for missing this. I still think that MIME sniffing is occurring
even if you don't have an option to disable it. <eg>

http://msdn.microsoft.com/library/d...op/networking/moniker/overview/appendix_a.asp

(MSN search for
"MIME sniffing" site:microsoft.com
)

<quote>
2. If the server-provided MIME type is either known or ambiguous,
the buffer is scanned in an attempt to verify or obtain a MIME type
from the actual content. If a positive match is found (one of the hard-coded
tests succeeded), this MIME type is immediately returned as the final
determination, overriding the server-provided MIME type (this type of
behavior is necessary to identify a .gif file being sent as text/html).
During scanning, it is determined if the buffer is predominantly text or binary.
</quote>

What does the first 256 bytes of the content look like?
Is it unique or could it be mistaken for one of the Known MIME types?
Notice that unique data would get you to step 3 in the procedure.

Do you have an entry for x-pkg in the registry?
(I assume that would help make it "known")
<example>
HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/x-pkg
</example>

Looks like all it has to do is match up with an extension which is then
associated with a particular application via filetype.

E.g. presumably there would then also be detail showing with each
of the following commands (in a cmd window):

assoc pkg
ftype PKGFile (or whatever the real filetype is)


I would like to see some documentation which describes
how to diagnose problems such as your case,
e.g. some trace records generated by the cited procedure
but I haven't found any.


HTH

Robert
---
 
D

Dario de Judicibus

Yes, I also found that statement. What is puzzling me is that IE should NOT
look for a content type IF content type is ALREADY provided INSIDE tje tag
by "type" attribute.

ZIP compressed file, of course, but IE should NOT change the extension by
default! Since the file HAS an extension, why IE should be so arrogant to
decide to change it? Please, NOTE that the problem is NOT to fix the IE
behaviour on MY machine. The problem is that ALL users of my applications
who are downloading a PKG module, have the module renamed as a ZIP file!

Therefore, any fix to my system is of NO help, and I cannot ask my users to
edit the registry. Most of them are even unware of the existence of registry
in Windows. They are END-users.

I would like to see too. Anyway I am upset by the fact that Microsoft does
not honor the W3C standards. I was told that IE7 will not support CSS2. I
hope is not true. But if IT IS true, I will ignore that fact and code for
firefox, even if that will make my sites and pages not perfect in IE. We
have to send as strong message to Microsoft: you have GOOD products but BAD
policies. Please, CHANGE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top