Closed
Bug 62939
Opened 24 years ago
Closed 24 years ago
Getting bogus MIME info from IC
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: ccarlen, Assigned: paulkchen)
References
()
Details
(Whiteboard: [branch accept])
Attachments
(6 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
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
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
Comment 8•24 years ago
|
||
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.
Comment 10•24 years ago
|
||
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.
Assignee | ||
Comment 11•24 years ago
|
||
Assignee | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
Assignee | ||
Comment 14•24 years ago
|
||
Removing alecf from cc list, he probably could do with less spam from this bug
Comment 15•24 years ago
|
||
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.
Assignee | ||
Comment 16•24 years ago
|
||
Comment 17•24 years ago
|
||
Fine.
Reporter | ||
Comment 18•24 years ago
|
||
Applied latest patch - it did the trick.
Comment 19•24 years ago
|
||
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
Assignee | ||
Comment 20•24 years ago
|
||
Fix has been checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 21•24 years ago
|
||
Added branch accept to status whiteboard.
.Angela...
Whiteboard: [branch accept]
Comment 22•24 years ago
|
||
So who at apple can get that embarrassing warning removed?
(http://www.apple.com/quicktime/preview/)
Comment 23•24 years ago
|
||
pchen - did you check this into the branch also? Wnated to confirm since
I didn't see specific comments on that. Thank you.
Comment 24•24 years ago
|
||
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.
Comment 25•24 years ago
|
||
I believe I am querying wrong - sorry for the spam. I will just wait for tever
to verify this on the branch builds.
Updated•24 years ago
|
Keywords: mozilla0.8
Comment 27•24 years ago
|
||
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)?
Comment 28•24 years ago
|
||
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.
Description
•