Closed Bug 62939 Opened 24 years ago Closed 24 years ago

Getting bogus MIME info from IC

Categories

(Core :: Networking, defect, P3)

PowerPC
Mac System 9.x
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ccarlen, Assigned: paulkchen)

References

()

Details

(Whiteboard: [branch accept])

Attachments

(6 files)

This was split off from bug 60203. Go to the above URL and try to download QuickTime. Notice the warning there about not using NS6 :-/ When the file has finished downloading, you'll end up with a "salted" file name with the wrong extension and the wrong file type. From 60203: The MIME type mentioned below is application/x-macbinary. We are using IC to fill in the nsIMIMEInfo. Problem is, for that MIME type, on my system, IC comes up with rubbish for that type. The file type is wrong, there is no post handler app, and worse, its MIME type field is blank. At http://lxr.mozilla.org/seamonkey/source/xpfe/appshell/src/nsInternetConfigService.cpp#208, we fill in the MIME type from what comes back in the ICMapEntry. In this case, the empty string causes a js exception in helperAppLauncher.js. This causes the dialog to never come up. Because of this, nsExternalAppHandler never gets the disposition info, nothing is done with the downloaded file, and we end up with the file still with the garbage name and the wrong file type. I think that nsIInternetConfigService::FillInMIMEInfo, when given a valid MIME type, should not allow the MIME type in what it fills in to become blank.
I'll take this one. Nominating for nsbeta1. We gotta fix stuff like this where web pages warn about using NS6.
Assignee: mscott → pchen
Keywords: nsbeta1
upping to critical. agreed. this is serious.
Severity: major → critical
Actually, the real bug is that an "OK" result from nsInternetConfigService::GetMappingForMIMEType() can mean one of two things: 1. we get a match from the IC database or 2. we didn't match at all. Whoops. I have a patch that returns fnfErr (the error just needs to be something other than NS_OK) if no match was found. There is code in nsOSHelperAppService::DoContent() that looks for the error and will perform a lookup on file extension. This does the right thing, and the quicktime installer gets sent to Stuffit Expander.
Status: NEW → ASSIGNED
got an r=pinkerton
removing myself from cc list, adding alecf to cc list
CCed Mac and Apple folks for feedback on patch.
If anyone from Apple sees this bug report, YOU GUYS CAN FIX THIS RIGHT NOW!!!!! Have your web servers return the MIME type as application/macbinary. This MIME type is in the prepopulated Internet Config database, and Netscape 6.0 will start working correctly.
Does this fix affect other areas which use Internet Config within Netscape 6? I'm wondering what would be good tests for this fix? The bug report shows OS 9; I assume this affects OS 8.x as well? Thank you.
Removing alecf from cc list, he probably could do with less spam from this bug
sr=sfraser on the last patch. An optimization would be to use nsCAutoString instead of the two temporary nsCStrings. Doing an allocation just to get Pascal->C string conversion is rather expensive. Doing this for all ~100 items in the MIME types array is even more so.
Applied latest patch - it did the trick.
style comments * i hope there aren't any tabs in this patch > if (ent.extension[0] != 0) * please use |if (ent.extension[0])| instead [don't explicitly compare w/ 0] if you attach another patch, could you use diff -u? thanks
Fix has been checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Added branch accept to status whiteboard. .Angela...
Whiteboard: [branch accept]
So who at apple can get that embarrassing warning removed? (http://www.apple.com/quicktime/preview/)
pchen - did you check this into the branch also? Wnated to confirm since I didn't see specific comments on that. Thank you.
I can't find a checkin to nsInternetConfigService.cpp on the commercial branch via bonsai on warp for this bug. paul - can you confirm? Thanks.
I believe I am querying wrong - sorry for the spam. I will just wait for tever to verify this on the branch builds.
yep - verified: Mac OS9 2001-01-17-16-MTEST
Status: RESOLVED → VERIFIED
Keywords: mozilla0.8
Just went to http://www.apple.com/quicktime/preview/ and it's still warning about NS6. Someone care to contact apple and point them to the server-side solution described in the 2000-12-27 09:41 comment (use application/macbinary)?
I will cc: chrisn on this. Chris - pls see above comments regarding Apple site.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: