Bug 92597 - Konqueror shows binary data as text if the link was opened from an external app
Summary: Konqueror shows binary data as text if the link was opened from an external app
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: 1.0-beta1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 94146 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-02 19:52 UTC by Malte S. Stretz
Modified: 2004-12-01 10:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte S. Stretz 2004-11-02 19:52:44 UTC
Version:           3.3.1 (using KDE 3.3.1, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

This is reproducable with aKregator (and probably also KMail, haven't tried that).  You need a feed (or maybe a mail) which links directly to a binary file, like a movie or an image.  If you middle-click on that link in aKregator (or chose "Open Link in External Browser" from the context menu), a new Konqueror window pops up. That window will display the raw data instead of using the correct handler from that mime type; it seems like the Content-Type header is ignored in that case.  As soon as you click Reload or press return in the address bar, Konqueror will note that it did something wrong and show its correct behaviour.
Comment 1 Teemu Rytilahti 2004-11-23 20:25:57 UTC
We should use ImagePart (or something like that) to handle f.ex. image files, don't know how to do this yet though.
Comment 2 Teemu Rytilahti 2004-11-30 12:08:56 UTC
*** Bug 94146 has been marked as a duplicate of this bug. ***
Comment 3 George Staikos 2004-12-01 10:24:52 UTC
CVS commit by staikos: 

use kapp->invokeBrowser() instead of KRun directly in order to get the right
behaviour and the right KPart for "external browser".  Unfortunately this
doesn't fix the viewing of non-HTML internally.  That's a different bug
though.
BUG: 92597


  M +1 -1      akregator_view.cpp   1.169
  M +9 -3      viewer.cpp   1.27


--- kdenonbeta/akregator/src/akregator_view.cpp  #1.168:1.169
@@ -1144,5 +1144,5 @@ void aKregatorView::displayInExternalBro
     if (!url.isValid()) return;
     if (Settings::externalBrowserUseKdeDefault())
-        KRun::runURL(url, "text/html", false, false);
+        kapp->invokeBrowser(url.url(), "0");
     else
     {

--- kdenonbeta/akregator/src/viewer.cpp  #1.26:1.27
@@ -91,5 +91,11 @@ void Viewer::displayInExternalBrowser(co
    if (!url.isValid()) return;
    if (Settings::externalBrowserUseKdeDefault())
+   {
+       if (mimetype.isEmpty()) {
+           kapp->invokeBrowser(url.url(), "0");
+       } else {
        KRun::runURL(url, mimetype, false, false);
+       }
+   }
    else
    {
@@ -112,5 +118,5 @@ bool Viewer::slotOpenURLRequest(const KU
    if(args.frameName == "_blank" && Settings::mMBBehaviour() == Settings::EnumMMBBehaviour::OpenInExternalBrowser)
    {
-       displayInExternalBrowser(url, "text/html");
+       displayInExternalBrowser(url, QString::null);
        return true;
    }
@@ -173,5 +179,5 @@ void Viewer::slotOpenLinkExternal()
 {
    if (m_url.isEmpty()) return;
-   displayInExternalBrowser(m_url, "text/html");
+   displayInExternalBrowser(m_url, QString::null);
 }