Bug 81875 - [testcase] Deal with web servers sending binary data as text/plain
Summary: [testcase] Deal with web servers sending binary data as text/plain
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.5.9
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 97260 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-19 20:59 UTC by Frederik Himpe
Modified: 2012-06-22 14:40 UTC (History)
2 users (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 Frederik Himpe 2004-05-19 20:59:22 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Mandrake RPMs
OS:                Linux

When a misconfigured webserver is sending a binary file with the text/plain mime type, konqueror opens this file in its embedded text editor. Instead, it should check if the file is really plain text. If it sees that it contains binary data, it should give the user the choice what to do with it. This is now the behaviour of Mozilla 1.7.

Extract from http://www.mozilla.org/docs/web-developer/mimetypes.html :
 Mozilla will generally not sniff the type of the document. However, starting in Mozilla 1.7alpha, Mozilla does do content sniffing, like this:
 When the Content-Type sent by the server is one of (case-sensitively) text/plain, text/plain; charset=ISO-8859-1 or text/plain; charset=iso-8859-1, and the server did not send a Content-Encoding header, Mozilla will sniff the first block of data it gets and check for non-text bytes. Text bytes are 9-13, 27, and 31-255. When encountering a non-text byte, the helper app dialog will be shown, showing the mime-type corresponding to the extension of the file. 

You can see this problem with the torrent files on www.suprnova.org .
Comment 1 Tommi Tervo 2005-08-09 15:44:06 UTC
*** Bug 97260 has been marked as a duplicate of this bug. ***
Comment 2 George Goldberg 2008-04-17 04:50:14 UTC
I've set up a new testcase here: http://www.grundleborg.com/kde/bugsquad/testcases/81875

This allows you to download an rpm with Content-Type: text/plain. firefox 2 handles it correctly as an rpm, but Konqueror trunk r795406 opens it in the embedded text-editor. 3.5.9 asks me if I want to save it or open it in kwrite, so I guess the bug is still there aswell.
Comment 3 Janek Bevendorff 2012-06-22 14:40:54 UTC
Message from the Bugsquad and Konqueror teams: This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore. If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report. Thank you for your understanding.