Comment 18 for bug 239952

Revision history for this message
In , Bugzilla-mozilla-tjworld (bugzilla-mozilla-tjworld) wrote :

Created an attachment (id=338993)
Call GetFromType() after GetFromExtension() when mime-type is not recognised

commit d14a61e1d07dcc0c8015114b13609104b0688502
Author: TJ <email address hidden>
Date: Wed Sep 17 01:29:10 2008 +0100

    When an incorrect or unrecognised Content-Type is found, and GetFromType() fails,
    GetFromExtension() is used to get the mime-type from the extension. When the download
    completes the helper fails to launch since it is re-evaluated using the (unrecognised)
    mime-type but no fall-back on the extension is done.

    This fix makes another call to GetFromType() after GetFromExtension() to determine the
    helper application and configure the mimeInfo object correctly (closes LP #239952 and
    Mozilla bug # 455626).

    Signed-off-by: TJ <email address hidden>

diff --git a/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp
index 39c4cb9..8300a61 100644
--- a/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ b/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp